Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Simplify num_connected_peers
  • Loading branch information
koute committed Feb 17, 2022
commit 489fe01787a84b6180e7c8994b292d4ec8b4fea0
2 changes: 1 addition & 1 deletion client/network/src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ impl<B: BlockT> Protocol<B> {

/// Returns the number of peers we're connected to.
pub fn num_connected_peers(&self) -> usize {
self.peers.values().count()
self.peers.len()
}

/// Returns the number of peers we're connected to and that are being queried.
Expand Down