Esempio n. 1
0
 public override void Write(ByteWriter writer)
 {
     writer.WriteVar(items.Count);
     foreach (var item in items)
     {
         writer.Write((int)item.BlockDataType, 4);
         writer.Write(item.Hash);
     }
 }
Esempio n. 2
0
        public void WriteTo(Stream stream)
        {
            var writer = new ByteWriter(stream);

            writer.Write(Magic(Testnet), 4);
            writer.Write(Command, 12);
            writer.Write(Payload.Length, 4);
            writer.Write(Cipher.Hash256Prefix(Payload));
            writer.Write(Payload);
        }
Esempio n. 3
0
 public override void Write(ByteWriter writer)
 {
     writer.WriteVar(addresses.Count);
     foreach (var address in addresses)
     {
         writer.Write(address);
     }
 }
Esempio n. 4
0
 public override void Write(ByteWriter writer)
 {
     writer.WriteVar(blockHeaders.Count);
     foreach (var header in blockHeaders)
     {
         writer.Write(header.ToBytes());
         writer.WriteVar(0);
     }
 }
 public override void Write(ByteWriter writer)
 {
     writer.Write((byte)FilterType);
     writer.Write(StartHeight, 4);
     writer.Write(StopHash);
 }