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:
João Oliveira
2024-02-27 22:12:44 +00:00
committed by GitHub
parent abd99652b4
commit 65c4ff0775
18 changed files with 171 additions and 193 deletions

View File

@@ -4,12 +4,12 @@ version = "0.1.0"
edition = { workspace = true }
[dependencies]
async-channel = { workspace = true }
tempfile = { workspace = true }
serde_json = { workspace = true }
task_executor = { workspace = true }
tokio = { workspace = true }
futures = { workspace = true }
exit-future = { workspace = true }
environment = { workspace = true }
execution_layer = { workspace = true }
sensitive_url = { workspace = true }
@@ -24,4 +24,4 @@ fork_choice = { workspace = true }
logging = { workspace = true }
[features]
portable = ["types/portable"]
portable = ["types/portable"]

View File

@@ -42,7 +42,7 @@ pub struct TestRig<E, T: EthSpec = MainnetEthSpec> {
ee_a: ExecutionPair<E, T>,
ee_b: ExecutionPair<E, T>,
spec: ChainSpec,
_runtime_shutdown: exit_future::Signal,
_runtime_shutdown: async_channel::Sender<()>,
}
/// Import a private key into the execution engine and unlock it so that we can
@@ -111,7 +111,7 @@ impl<E: GenericExecutionEngine> TestRig<E> {
.build()
.unwrap(),
);
let (runtime_shutdown, exit) = exit_future::signal();
let (runtime_shutdown, exit) = async_channel::bounded(1);
let (shutdown_tx, _) = futures::channel::mpsc::channel(1);
let executor = TaskExecutor::new(Arc::downgrade(&runtime), exit, log.clone(), shutdown_tx);
let mut spec = TEST_FORK.make_genesis_spec(MainnetEthSpec::default_spec());