Upgrade libp2p to 0.46.1 (#11787)

* Update libp2p to 0.46.0

* Update libp2p to 0.46.1

* Fix telemetry initialization

* Fix tests
This commit is contained in:
Roman
2022-07-12 21:00:00 +04:00
committed by GitHub
parent 47b27c292f
commit 1902dc169d
19 changed files with 151 additions and 274 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
chrono = "0.4.19"
futures = "0.3.21"
libp2p = { version = "0.45.1", default-features = false, features = ["dns-async-std", "tcp-async-io", "wasm-ext", "websocket"] }
libp2p = { version = "0.46.1", default-features = false, features = ["dns-async-std", "tcp-async-io", "wasm-ext", "websocket"] }
log = "0.4.17"
parking_lot = "0.12.0"
pin-project = "1.0.10"
+2 -1
View File
@@ -31,7 +31,8 @@ const CONNECT_TIMEOUT: Duration = Duration::from_secs(20);
pub(crate) fn initialize_transport() -> Result<WsTrans, io::Error> {
let transport = {
let inner = block_on(libp2p::dns::DnsConfig::system(libp2p::tcp::TcpConfig::new()))?;
let tcp_transport = libp2p::tcp::TcpTransport::new(libp2p::tcp::GenTcpConfig::new());
let inner = block_on(libp2p::dns::DnsConfig::system(tcp_transport))?;
libp2p::websocket::framed::WsConfig::new(inner).and_then(|connec, _| {
let connec = connec
.with(|item| {