Example #1
0
        public Header(string command)
        {
            var payload = new byte[] { };

            Magic         = 0xD9B4BEF9;
            Command       = command.PadRight(12, '\0');
            PayloadLength = 0;
            Checksum      = BitcoinHelper.CalculateChecksum(payload);
        }
Example #2
0
 public void CalculateChecksum(byte[] payload)
 {
     PayloadLength = Convert.ToUInt32(payload.Length);
     Checksum      = BitcoinHelper.CalculateChecksum(payload);
 }