Skip to content
Snippets Groups Projects
Commit 6ae24c91 authored by Pierre Krieger's avatar Pierre Krieger Committed by GitHub
Browse files

Fix Network trait implementation not doing what it's supposed to do (#7985)

parent 054b0f54
No related merge requests found
......@@ -113,7 +113,7 @@ impl<B: BlockT, H: ExHashT> Network<B> for Arc<NetworkService<B, H>> {
fn add_set_reserved(&self, who: PeerId, protocol: Cow<'static, str>) {
let addr = iter::once(multiaddr::Protocol::P2p(who.into()))
.collect::<multiaddr::Multiaddr>();
let result = NetworkService::add_to_peers_set(self, protocol, iter::once(addr).collect());
let result = NetworkService::add_peers_to_reserved_set(self, protocol, iter::once(addr).collect());
if let Err(err) = result {
log::error!(target: "gossip", "add_set_reserved failed: {}", err);
}
......@@ -122,7 +122,7 @@ impl<B: BlockT, H: ExHashT> Network<B> for Arc<NetworkService<B, H>> {
fn remove_set_reserved(&self, who: PeerId, protocol: Cow<'static, str>) {
let addr = iter::once(multiaddr::Protocol::P2p(who.into()))
.collect::<multiaddr::Multiaddr>();
let result = NetworkService::remove_from_peers_set(self, protocol, iter::once(addr).collect());
let result = NetworkService::remove_peers_from_reserved_set(self, protocol, iter::once(addr).collect());
if let Err(err) = result {
log::error!(target: "gossip", "remove_set_reserved failed: {}", err);
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment