Beispiel #1
0
 private byte[] GetPayload()
 {
     return(BitConverter.GetBytes(ProtocolVersion)
            .Concat(BitConverter.GetBytes(Services))
            .Concat(BitConverter.GetBytes(Timestamp))
            .Concat(RecipientAddress.ToBytes())
            .Concat(SenderAddress.ToBytes())
            .Concat(BitConverter.GetBytes(Nonce))
            .Concat(UserAgentLength.ToBytes())
            .Concat(Encoding.ASCII.GetBytes(UserAgent))
            .Concat(BitConverter.GetBytes(StartHeight))
            .Concat(Relay ? new byte[] { 0x01 } : new byte[] { 0x00 })
            .ToArray());
 }