libp2p-next (#5278)

* Adapt to rust-libp2p#1440.

* Further adapt to libp2p/master.

* Update to libp2p-0.17

* Finishing touches.

* Remove stray TODO.

* Incorporate review feedback.

* Remove unused import.
This commit is contained in:
Roman Borschel
2020-04-08 09:23:21 +02:00
committed by GitHub
parent 1a9c0fee30
commit f8c8355ac7
26 changed files with 1049 additions and 681 deletions
+9
View File
@@ -255,3 +255,12 @@ pub use libp2p::{Multiaddr, PeerId};
pub use libp2p::multiaddr;
pub use sc_peerset::ReputationChange;
/// The maximum allowed number of established connections per peer.
///
/// Typically, and by design of the network behaviours in this crate,
/// there is a single established connection per peer. However, to
/// avoid unnecessary and nondeterministic connection closure in
/// case of (possibly repeated) simultaneous dialing attempts between
/// two peers, the per-peer connection limit is not set to 1 but 2.
const MAX_CONNECTIONS_PER_PEER: usize = 2;