Zebra/zebra-chain/src/block
Henry de Valence b449fe93b2 network: correct data modeling for headers messages
We modeled a Bitcoin `headers` message as being a list of block headers.
However, the actual data structure is slightly different: it's a list of (block
header, transaction count) pairs.  This caused zcashd to reject our headers
messages.

To fix this, introduce a new `CountedHeader` struct with a `block::Header` and
transaction count `usize`, then thread it through the inbound service and the
state.

I tested this locally by running Zebra with these changes and inspecting a
trace-level log of the span of a peer connection that requested a nontrivial
headers packet from us, and verified that it did not reject our message.
2020-12-02 10:24:31 -08:00
..
tests chain: fix consensus-critical coinbase encoding bug 2020-12-01 10:14:44 +10:00
arbitrary.rs Implement Expanded to Compact Difficulty Conversion (#1196) 2020-10-30 11:36:59 +10:00
hash.rs Reverse displayed endianness of transaction and block hashes (#1171) 2020-10-22 07:54:02 +10:00
header.rs network: correct data modeling for headers messages 2020-12-02 10:24:31 -08:00
height.rs Call `zebra_test::init` where needed. (#1227) 2020-11-10 10:29:25 +10:00
merkle.rs Show transaction hashes on merkle failure 2020-12-01 10:14:44 +10:00
root_hash.rs Update to `RootHash` in comments 2020-09-16 12:26:25 -04:00
serialize.rs network: correct data modeling for headers messages 2020-12-02 10:24:31 -08:00
tests.rs export proptest impls for use in downstream crates (#1092) 2020-09-23 18:52:52 -07:00