Split peer slots between full and light nodes (#10688)

* Split peer slots between full and light nodes

* Rustfmt

* Oops, accidentally removed a comma

* Remove else
This commit is contained in:
Pierre Krieger authored and GitHub committed 2022-01-19 10:58:40 +00:00
1 parent fcfc70eaa2
commit 2c3787288a
5 files changed
+48 -6

No files matched your search

@@ -648,6 +648,11 @@ impl<B: BlockT> ChainSync<B> {
self.downloaded_blocks
}
/// Returns the current number of peers stored within this state machine.
pub fn num_peers(&self) -> usize {
self.peers.len()
}
/// Handle a new connected peer.
///
/// Call this method whenever we connect to a new peer.