Module connection

Source
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 🔒
InboundMessage
The outcome of mapping an inbound Message to a Request.
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 is now.
transaction_ids 🔒
Map a list of inventory hashes to the corresponding unmined transaction IDs. Non-transaction inventory hashes are skipped.