Zebra/zebra-network/src/peer
teor d2e14b22f9
Refactor BestTipHeight into a generic ChainTip sender and receiver (#2676)
* Rename BestTipHeight so it can be generalised to ChainTipSender

`fastmod BestTipHeight ChainTipSender zebra*`

For senders:
`fastmod best_tip_height chain_tip_sender zebra*`

For receivers:
`fastmod best_tip_height chain_tip_receiver zebra*`

* Rename best_tip_height module to chain_tip

* Wrap the chain tip watch channel in a ChainTipReceiver type

* Create a ChainTip trait to avoid tricky crate dependencies

And add convenience impls for optional and empty chain tips.

* Use the ChainTip trait in zebra-network

* Replace `Option<ChainTip>` with `NoChainTip`

Co-authored-by: Janito Vaqueiro Ferreira Filho <janito.vff@gmail.com>

Co-authored-by: Janito Vaqueiro Ferreira Filho <janito.vff@gmail.com>
2021-08-27 11:34:33 +10:00
..
client.rs Document the correctness of Poll::Pending wakeups 2021-03-27 08:55:49 -04:00
connection.rs Stop converting `Message::Inv(TxId+)` into `Request::TransactionsById` (#2660) 2021-08-24 21:40:21 +00:00
connector.rs Refactor BestTipHeight into a generic ChainTip sender and receiver (#2676) 2021-08-27 11:34:33 +10:00
error.rs Refactor and document correctness for std::sync::Mutex in ErrorSlot 2021-04-21 16:39:06 -04:00
handshake.rs Refactor BestTipHeight into a generic ChainTip sender and receiver (#2676) 2021-08-27 11:34:33 +10:00