Zebra/zebra-network/src/protocol
teor b1f14f47c6
Rewrite GetData handling to match the zcashd implementation (#1518)
* Rewrite GetData handling to match the zcashd implementation

`zcashd` silently ignores missing blocks, but sends found transactions
followed by a `NotFound` message:
e7b425298f/src/main.cpp (L5497)

This is significantly different to the behaviour expected by the old
Zebra connection state machine, which expected `NotFound` for blocks.

Also change Zebra's GetData responses to peer request so they ignore
missing blocks.

* Stop hanging on incomplete transaction or block responses

Instead, if the peer sends an unexpected block, unexpected transaction,
or NotFound message:
1. end the request, and return a partial response containing any items
   that were successfully received
2. if none of the expected blocks or transactions were received, return
   an error, and close the connection
2021-01-04 13:25:35 +10:00
..
external Rewrite GetData handling to match the zcashd implementation (#1518) 2021-01-04 13:25:35 +10:00
internal Rewrite GetData handling to match the zcashd implementation (#1518) 2021-01-04 13:25:35 +10:00
external.rs fix last warnings 2020-05-27 15:42:29 -04:00
internal.rs Refactor protocol into internal, external modules. 2019-11-27 05:06:01 -05:00
types.rs Refactor protocol into internal, external modules. 2019-11-27 05:06:01 -05:00