Skip to content

Commit

Permalink
Remove unncessary call remove_from_peers_set (#4742)
Browse files Browse the repository at this point in the history
... this is superfluous because set_reserved_peers implementation
already calls this method here:

https://github.com/paritytech/polkadot-sdk/blob/cdb297b15ad9c1d952c0501afaf6b764e5fd147c/substrate/client/network/src/protocol_controller.rs#L571,
so the call just ends producing this warnings whenever we manipulate the
peers set.

```
Trying to remove unknown reserved node 12D3KooWRCePWvHoBbz9PSkw4aogtdVqkVDhiwpcHZCqh4hdPTXC from SetId(3)
peerset warnings (from different peers)
```

Signed-off-by: Alexandru Gheorghe <[email protected]>
  • Loading branch information
alexggh authored Jun 10, 2024
1 parent a3472c4 commit b65313e
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions polkadot/node/network/bridge/src/validator_discovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,6 @@ impl<N: Network, AD: AuthorityDiscovery> Service<N, AD> {
{
gum::warn!(target: LOG_TARGET, err = ?e, "AuthorityDiscoveryService returned an invalid multiaddress");
}
// the addresses are known to be valid
//
// for peer-set management, the main protocol name should be used regardless of
// the negotiated version.
let _ = network_service
.remove_from_peers_set(
self.peerset_protocol_names.get_main_name(peer_set),
peers_to_remove,
)
.await;

network_service
}
Expand Down

0 comments on commit b65313e

Please sign in to comment.