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. |
||
---|---|---|
.. | ||
contrib | ||
embedded | ||
examples | ||
src | ||
tests | ||
CHANGELOG.md | ||
Cargo.toml |