rust-bitcoin-unsafe-fast/bitcoin/src/p2p
Nick Johnson 72e97c637f Add a hash value to Inventory's Error variant
While the hash value of the Error variant is meaningless, the variant
still conforms to all other Inventory messages and requires a 32
byte hash to be sent over the wire. This is how bitcoin core operates.

This patch adds the 32 byte array to the Error variant in order to make
its Encoding and Decoding paths symmetrical. This also allows a reader
to discard the 32 bytes when decoding a message. The hash is still not
exposed to the caller.

This was never a problem before because the top level RawNetworkPackage
pulls all the required bytes off a reader before decoding. But this is
not as easy to do with the v2 p2p network messages.
2024-12-18 19:24:26 -08:00
..
address.rs Rename tests that have _test suffix 2024-11-14 14:05:15 -06:00
message.rs Add a hash value to Inventory's Error variant 2024-12-18 19:24:26 -08:00
message_blockdata.rs Add a hash value to Inventory's Error variant 2024-12-18 19:24:26 -08:00
message_bloom.rs Add error constructor parse_failed_error 2024-10-22 11:47:34 +11:00
message_compact_blocks.rs Removed //! spare line at end of headers 2024-05-16 09:59:55 +01:00
message_filter.rs Remove usage of blockdata from paths 2024-06-20 12:00:22 +10:00
message_network.rs Add error constructor parse_failed_error 2024-10-22 11:47:34 +11:00
mod.rs Remove double spacing in rustdocs 2024-12-17 14:21:12 +00:00