public override void WriteToBitcoinBuffer(byte[] buffer, int offset) { Version.WriteBytes(buffer, offset); PreviousBlock.WriteToBitcoinBuffer(buffer, PreviousBlock_Offset(ref offset)); MerkleRoot.WriteToBitcoinBuffer(buffer, MerkleRoot_Offset(ref offset)); Timestamp.WriteBytes(buffer, Timestamp_Offset(ref offset)); Bits.WriteBytes(buffer, Bits_Offset(ref offset)); Nonce.WriteBytes(buffer, Nonce_Offset(ref offset)); Transactions.WriteToBitcoinBuffer(buffer, Transactions_Offset(ref offset)); }
public override void WriteToBitcoinBuffer(byte[] buffer, int offset) { Version.WriteBytes(buffer, offset); ((ulong)Services).WriteBytes(buffer, offset + SERVICES_OFFSET); Timestamp.WriteBytes(buffer, offset + TIMESTAMP_OFFSET); EmittingAddress.WriteToBitcoinBuffer(buffer, offset + EMIT_ADDRESS_OFFSET); if (Version >= 106) { ReceivingAddress.WriteToBitcoinBuffer(buffer, offset + RECV_ADDRESS_OFFSET); Nonce.WriteBytes(buffer, offset + NONCE_OFFSET); SubVersionNum.WriteToBitcoinBuffer(buffer, offset + SUBVER_OFFSET); } if (Version >= 209) { StartHeight.WriteBytes(buffer, offset + STARTHEIGHT_OFFSET); } }