Add a substrate-peerset crate (#2042)

* Add a substrate-peerset crate

* Some adjustements

* More adjustements

* Use a temporary libp2p branch

* Add back-off mechanism

* Fix RPC tests

* Some adjustements

* Another libp2p bugfix

* Do a round-robin in the peerset

* Use a real dependency instead of a patch for libp2p

* Initialize reserved nodes correctly

* Better diagnostic for no address

* Don't allocate slots if in reserved only

* Ban node on dial failure

* Fix indentation
This commit is contained in:
Pierre Krieger
2019-03-21 14:02:28 +01:00
committed by Robert Habermeier
parent f6f15b618e
commit 90c6f85db5
17 changed files with 1255 additions and 1517 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ fn build_nodes<TMsg>(num: usize) -> Vec<substrate_network_libp2p::Service<TMsg>>
};
let proto = substrate_network_libp2p::RegisteredProtocol::new(*b"tst", &[1]);
result.push(substrate_network_libp2p::start_service(config, proto).unwrap());
result.push(substrate_network_libp2p::start_service(config, proto).unwrap().0);
}
result