core/src: Remove poll_broadcast connection notification mechanism (#1527)

* core/src: Remove poll_broadcast connection notification mechanism

The `Network::poll_broadcast` function has not proven to be useful. This
commit removes the mechanism all the way down to the connection manager.

With `poll_broadcast` gone there is no mechanism left to send commands
to pending connections. Thereby command buffering for pending
connections is not needed anymore and is thus removed in this commit as
well.

* core/src/connection/manager.rs: Remove warning comment

Co-Authored-By: Pierre Krieger <pierre.krieger1708@gmail.com>

Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
This commit is contained in:
Max Inden
2020-03-31 14:56:04 +02:00
committed by GitHub
parent 2296a87b73
commit bc455038fc
4 changed files with 17 additions and 85 deletions

View File

@ -269,18 +269,6 @@ where
})
}
/// Notifies the connection handler of _every_ connection of _every_ peer of an event.
///
/// This function is "atomic", in the sense that if `Poll::Pending` is returned then no event
/// has been sent to any node yet.
#[must_use]
pub fn poll_broadcast(&mut self, event: &TInEvent, cx: &mut Context) -> Poll<()>
where
TInEvent: Clone
{
self.pool.poll_broadcast(event, cx)
}
/// Returns a list of all connected peers, i.e. peers to whom the `Network`
/// has at least one established connection.
pub fn connected_peers(&self) -> impl Iterator<Item = &TPeerId> {
@ -641,4 +629,3 @@ impl NetworkConfig {
self
}
}