mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 10:27:59 +00:00
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:
committed by
Arkadiy Paronyan
parent
abf799f78f
commit
52dbf0cace
@@ -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()
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user