Skip to content

Commit

Permalink
Clean up network/service.rs (#1417)
Browse files Browse the repository at this point in the history
* Add `gossip_desired_iter` and improve `gossip_desired_num`

* Don't clone PeerIds in remove_chain

* Add `SubstreamDirection::min/max_value()`

* Put `NotificationsProtocol` in `Protocol`

* Extract handshake properties to separate functions

* Return proper errors from gossip_open and gossip_close

* Fix state mismatch with inbound substreams

* Add `asked_to_leave` flag to substream state

* Reorder fields

* Don't error in `remove_chain` for pending openings

* General clean-up of `next_event`

* Close inbound substreams when out block announces is closed

* Accept inbound substreams if a previous one was asked to leave

* Bugfix in gossip_connected_peers

* Some clean up of `gossip_open`

* Properly close all substreams in gossip_close

* Consider shutdown when reopening substreams

* Another bugfix with reopening after closing

* Add TODO

* Close inbound attempts when failing to open

* PR link
  • Loading branch information
tomaka authored Nov 27, 2023
1 parent 96d910b commit 675ff8d
Show file tree
Hide file tree
Showing 2 changed files with 902 additions and 681 deletions.
Loading

0 comments on commit 675ff8d

Please sign in to comment.