diff --git a/helper/Cargo.toml b/helper/Cargo.toml index 5fd346048..930d2d9fe 100644 --- a/helper/Cargo.toml +++ b/helper/Cargo.toml @@ -13,7 +13,7 @@ repository = "https://github.com/Cuprate/cuprate/tree/main/consensus" default = [] std = [] atomic = ["dep:crossbeam"] -asynch = ["dep:futures", "dep:rayon"] +asynch = ["dep:futures", "dep:rayon", "dep:tokio"] cast = [] constants = [] crypto = ["dep:curve25519-dalek", "dep:monero-oxide", "std"] @@ -38,6 +38,7 @@ monero-oxide = { workspace = true, optional = true } rayon = { workspace = true, optional = true } serde = { workspace = true, optional = true, features = ["derive"] } +tokio = { workspace = true, optional = true, features = ["full"] } # This is kinda a stupid work around. # [thread] needs to activate one of these libs (windows|libc) @@ -47,9 +48,5 @@ target_os_lib = { package = "windows", version = ">=0.51", features = ["Win32_Sy [target.'cfg(unix)'.dependencies] target_os_lib = { package = "libc", version = "0.2", optional = true } -[dev-dependencies] -tokio = { workspace = true, features = ["full"] } -curve25519-dalek = { workspace = true } - [lints] workspace = true diff --git a/helper/src/asynch.rs b/helper/src/asynch.rs index 9868191b0..4a78ffedb 100644 --- a/helper/src/asynch.rs +++ b/helper/src/asynch.rs @@ -10,6 +10,7 @@ use core::{ }; use futures::{channel::oneshot, FutureExt}; +use tokio as _; //---------------------------------------------------------------------------------------------------- InfallibleOneshotReceiver /// A oneshot receiver channel that doesn't return an Error.