mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-15 03:21:06 +00:00
NetworkService: change remove_from_peers_set to accept PeerIds (#9964)
* NetworkService: expose split_multiaddr_and_peer_id * Revert "NetworkService: expose split_multiaddr_and_peer_id" This reverts commit 47b9a0d57c3617e64d01c449afca8896bd4bb6b6. * change remove_from_peer_set to accets PeerIds * fixes * try fixing it * try fixing it again * FMT * revert me * Revert "revert me" This reverts commit 1ea34f473f1aedc8b3e6e888d1ad2e1b45eaa1e0.
This commit is contained in:
@@ -123,16 +123,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_peers_from_reserved_set(
|
||||
self,
|
||||
protocol,
|
||||
iter::once(addr).collect(),
|
||||
);
|
||||
if let Err(err) = result {
|
||||
log::error!(target: "gossip", "remove_set_reserved failed: {}", err);
|
||||
}
|
||||
NetworkService::remove_peers_from_reserved_set(self, protocol, iter::once(who).collect());
|
||||
}
|
||||
|
||||
fn disconnect_peer(&self, who: PeerId, protocol: Cow<'static, str>) {
|
||||
|
||||
Reference in New Issue
Block a user