Upgrade to libp2p 0.15 (#4732)

* Fixes for libp2p 0.15

* More work

* Update libp2p

* Update to libp2p 0.15
This commit is contained in:
Pierre Krieger
2020-01-27 18:27:36 +01:00
committed by Gavin Wood
parent ed3da9f903
commit 5c8743510e
16 changed files with 332 additions and 237 deletions
+5
View File
@@ -32,6 +32,7 @@ use libp2p::identity::{Keypair, ed25519};
use libp2p::wasm_ext;
use libp2p::{PeerId, Multiaddr, multiaddr};
use core::{fmt, iter};
use std::{future::Future, pin::Pin};
use std::{error::Error, fs, io::{self, Write}, net::Ipv4Addr, path::{Path, PathBuf}, sync::Arc};
use zeroize::Zeroize;
@@ -40,6 +41,10 @@ pub struct Params<B: BlockT, S, H: ExHashT> {
/// Assigned roles for our node (full, light, ...).
pub roles: Roles,
/// How to spawn background tasks. If you pass `None`, then a threads pool will be used by
/// default.
pub executor: Option<Box<dyn Fn(Pin<Box<dyn Future<Output = ()> + Send>>) + Send>>,
/// Network layer configuration.
pub network_config: NetworkConfiguration,