mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-11 23:31:07 +00:00
Fix Network trait implementation not doing what it's supposed to do (#7985)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user