mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
remove exit-future (#5183)
* remove exit-future usage, as it is non maintained, and replace with async-channel which is already in the repo. * Merge branch 'unstable' of https://github.com/sigp/lighthouse into remove-exit-future * Merge branch 'unstable' of https://github.com/sigp/lighthouse into remove-exit-future
This commit is contained in:
@@ -5,6 +5,7 @@ authors = ["Sigma Prime <contact@sigmaprime.io>"]
|
||||
edition = { workspace = true }
|
||||
|
||||
[dependencies]
|
||||
async-channel = { workspace = true }
|
||||
discv5 = { workspace = true }
|
||||
unsigned-varint = { version = "0.6", features = ["codec"] }
|
||||
ssz_types = { workspace = true }
|
||||
@@ -55,7 +56,6 @@ hex_fmt = "0.3.0"
|
||||
instant = "0.1.12"
|
||||
quick-protobuf = "0.8"
|
||||
void = "1.0.2"
|
||||
async-channel = "1.9.0"
|
||||
asynchronous-codec = "0.7.0"
|
||||
base64 = "0.21.5"
|
||||
libp2p-mplex = "0.41"
|
||||
@@ -70,7 +70,6 @@ features = ["identify", "yamux", "noise", "dns", "tcp", "tokio", "plaintext", "s
|
||||
slog-term = { workspace = true }
|
||||
slog-async = { workspace = true }
|
||||
tempfile = { workspace = true }
|
||||
exit-future = { workspace = true }
|
||||
quickcheck = { workspace = true }
|
||||
quickcheck_macros = { workspace = true }
|
||||
async-std = { version = "1.6.3", features = ["unstable"] }
|
||||
|
||||
@@ -46,7 +46,7 @@ pub struct Libp2pInstance(
|
||||
LibP2PService<ReqId, E>,
|
||||
#[allow(dead_code)]
|
||||
// This field is managed for lifetime purposes may not be used directly, hence the `#[allow(dead_code)]` attribute.
|
||||
exit_future::Signal,
|
||||
async_channel::Sender<()>,
|
||||
);
|
||||
|
||||
impl std::ops::Deref for Libp2pInstance {
|
||||
@@ -110,7 +110,7 @@ pub async fn build_libp2p_instance(
|
||||
let config = build_config(boot_nodes);
|
||||
// launch libp2p service
|
||||
|
||||
let (signal, exit) = exit_future::signal();
|
||||
let (signal, exit) = async_channel::bounded(1);
|
||||
let (shutdown_tx, _) = futures::channel::mpsc::channel(1);
|
||||
let executor = task_executor::TaskExecutor::new(rt, exit, log.clone(), shutdown_tx);
|
||||
let libp2p_context = lighthouse_network::Context {
|
||||
|
||||
Reference in New Issue
Block a user