Rewrite the libp2p networking (#742)

* Rewrite the libp2p networking

* Fix erroneous replacement during rebase

* Update libp2p

* Update libp2p

* Remove the logic error about useless substreams

* Use the new NodeHandler system of libp2p

* Commit the Cargo.lock

* Upgrade yamux

* Forward port latest changes

* Fix compilation issues

* Implement the external URL

* Update to latest networking fixes

* Forward port rest of v0.2

* Fix reserved peers being dropped when we're full
This commit is contained in:
Pierre Krieger
2018-09-26 11:56:32 +02:00
committed by Arkadiy Paronyan
parent abf799f78f
commit 52dbf0cace
16 changed files with 3504 additions and 2369 deletions
+3 -3
View File
@@ -58,7 +58,7 @@ pub mod error;
pub mod informant;
mod panic_hook;
use network_libp2p::AddrComponent;
use network_libp2p::Protocol;
use runtime_primitives::traits::As;
use service::{
ServiceFactory, FactoryFullConfiguration, RuntimeGenesis,
@@ -305,8 +305,8 @@ where
None => 30333,
};
config.network.listen_addresses = vec![
iter::once(AddrComponent::IP4(Ipv4Addr::new(0, 0, 0, 0)))
.chain(iter::once(AddrComponent::TCP(port)))
iter::once(Protocol::Ip4(Ipv4Addr::new(0, 0, 0, 0)))
.chain(iter::once(Protocol::Tcp(port)))
.collect()
];
}