mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 17:31:05 +00:00
Update to libp2p-0.36 (#8420)
* Update to libp2p-0.36 * Some more Cargo.lock updates.
This commit is contained in:
@@ -63,17 +63,17 @@ wasm-timer = "0.2"
|
||||
zeroize = "1.2.0"
|
||||
|
||||
[dependencies.libp2p]
|
||||
version = "0.35.1"
|
||||
version = "0.36.0"
|
||||
|
||||
[target.'cfg(target_os = "unknown")'.dependencies.libp2p]
|
||||
version = "0.35.1"
|
||||
version = "0.36.0"
|
||||
default-features = false
|
||||
features = ["identify", "kad", "mdns", "mplex", "noise", "ping", "request-response", "tcp-async-io", "websocket", "yamux"]
|
||||
|
||||
|
||||
[dev-dependencies]
|
||||
assert_matches = "1.3"
|
||||
libp2p = { version = "0.35.1", default-features = false }
|
||||
libp2p = { version = "0.36.0", default-features = false }
|
||||
quickcheck = "1.0.3"
|
||||
rand = "0.7.2"
|
||||
sp-keyring = { version = "3.0.0", path = "../../primitives/keyring" }
|
||||
|
||||
@@ -61,7 +61,7 @@ use libp2p::kad::handler::KademliaHandlerProto;
|
||||
use libp2p::kad::QueryId;
|
||||
use libp2p::kad::record::{self, store::{MemoryStore, RecordStore}};
|
||||
#[cfg(not(target_os = "unknown"))]
|
||||
use libp2p::mdns::{Mdns, MdnsEvent};
|
||||
use libp2p::mdns::{Mdns, MdnsConfig, MdnsEvent};
|
||||
use libp2p::multiaddr::Protocol;
|
||||
use log::{debug, info, trace, warn};
|
||||
use std::{cmp, collections::{HashMap, HashSet, VecDeque}, io, num::NonZeroUsize, time::Duration};
|
||||
@@ -220,7 +220,7 @@ impl DiscoveryConfig {
|
||||
discovery_only_if_under_num,
|
||||
#[cfg(not(target_os = "unknown"))]
|
||||
mdns: if enable_mdns {
|
||||
MdnsWrapper::Instantiating(Mdns::new().boxed())
|
||||
MdnsWrapper::Instantiating(Mdns::new(MdnsConfig::default()).boxed())
|
||||
} else {
|
||||
MdnsWrapper::Disabled
|
||||
},
|
||||
|
||||
@@ -63,10 +63,11 @@ pub fn build_transport(
|
||||
let desktop_trans = tcp::TcpConfig::new().nodelay(true);
|
||||
let desktop_trans = websocket::WsConfig::new(desktop_trans.clone())
|
||||
.or_transport(desktop_trans);
|
||||
OptionalTransport::some(if let Ok(dns) = dns::DnsConfig::new(desktop_trans.clone()) {
|
||||
let dns_init = futures::executor::block_on(dns::DnsConfig::system(desktop_trans.clone()));
|
||||
OptionalTransport::some(if let Ok(dns) = dns_init {
|
||||
EitherTransport::Left(dns)
|
||||
} else {
|
||||
EitherTransport::Right(desktop_trans.map_err(dns::DnsErr::Underlying))
|
||||
EitherTransport::Right(desktop_trans.map_err(dns::DnsErr::Transport))
|
||||
})
|
||||
} else {
|
||||
OptionalTransport::none()
|
||||
|
||||
@@ -20,7 +20,7 @@ parking_lot = "0.11.1"
|
||||
futures = "0.3.9"
|
||||
futures-timer = "3.0.1"
|
||||
rand = "0.7.2"
|
||||
libp2p = { version = "0.35.1", default-features = false }
|
||||
libp2p = { version = "0.36.0", default-features = false }
|
||||
sp-consensus = { version = "0.9.0", path = "../../../primitives/consensus/common" }
|
||||
sc-consensus = { version = "0.9.0", path = "../../consensus/common" }
|
||||
sc-client-api = { version = "3.0.0", path = "../../api" }
|
||||
|
||||
Reference in New Issue
Block a user