Expand description
Zebra’s per-peer connection state machine.
Maps the external Zcash/Bitcoin protocol to Zebra’s internal request/response protocol.
This module contains a lot of undocumented state, assumptions and invariants.
And it’s unclear if these assumptions match the zcashd
implementation.
It should be refactored into a cleaner set of request/response pairs (#1515).
Modules§
- peer_tx 🔒
- The peer message sender channel.
Structs§
- Connection
- The channels, services, and associated state for a peer connection.
Enums§
- Handler 🔒
- Inbound
Message - The outcome of mapping an inbound
Message
to aRequest
. - State 🔒
Functions§
- block_
hashes 🔒 - Map a list of inventory hashes to the corresponding block hashes. Non-block inventory hashes are skipped.
- overload_
drop_ 🔒connection_ probability - Returns the probability of dropping a connection where the last overload was at
prev
, and the current overload isnow
. - transaction_
ids 🔒 - Map a list of inventory hashes to the corresponding unmined transaction IDs. Non-transaction inventory hashes are skipped.