Skip to content

Commit

Permalink
Simplify num_connected_peers
Browse files Browse the repository at this point in the history
  • Loading branch information
koute committed Feb 17, 2022
1 parent e7be15e commit 489fe01
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit 489fe01

Please sign in to comment.