Skip to content
This repository was archived by the owner on Jul 1, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
libp2p = { version = "0.35.0", default-features = false, features = ["dns", "noise", "plaintext", "tcp-async-io", "yamux"] }
libp2p = { version = "0.36.0", default-features = false, features = ["dns-async-std", "noise", "plaintext", "tcp-async-io", "yamux"] }
futures_codec = "0.4"
futures = "0.3.1"
async-std = { version = "1.6.2", features = ["attributes"] }
Expand Down
5 changes: 4 additions & 1 deletion rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ mod handler;
mod protocol;

pub use behaviour::{Perf, PerfEvent};
use futures::executor::block_on;

use libp2p::{
core::{
Expand Down Expand Up @@ -139,7 +140,9 @@ pub fn build_transport(
let transport = if in_memory {
EitherTransport::Left(MemoryTransport {})
} else {
EitherTransport::Right(dns::DnsConfig::new(tcp::TcpConfig::new().nodelay(true))?)
EitherTransport::Right(block_on(dns::DnsConfig::system(
tcp::TcpConfig::new().nodelay(true),
))?)
};

Ok(transport
Expand Down