mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-21 23:08:23 +00:00
Upgrade discovery and restructure task execution (#1693)
* Initial rebase * Remove old code * Correct release tests * Rebase commit * Remove eth2-testnet dep on eth2libp2p * Remove crates lost in rebase * Remove unused dep
This commit is contained in:
@@ -59,7 +59,7 @@ pub struct Service<TSpec: EthSpec> {
|
||||
|
||||
impl<TSpec: EthSpec> Service<TSpec> {
|
||||
pub async fn new(
|
||||
executor: environment::TaskExecutor,
|
||||
executor: task_executor::TaskExecutor,
|
||||
config: &NetworkConfig,
|
||||
enr_fork_id: EnrForkId,
|
||||
log: &slog::Logger,
|
||||
@@ -109,7 +109,7 @@ impl<TSpec: EthSpec> Service<TSpec> {
|
||||
Behaviour::new(&local_keypair, config, network_globals.clone(), &log).await?;
|
||||
|
||||
// use the executor for libp2p
|
||||
struct Executor(environment::TaskExecutor);
|
||||
struct Executor(task_executor::TaskExecutor);
|
||||
impl libp2p::core::Executor for Executor {
|
||||
fn exec(&self, f: Pin<Box<dyn Future<Output = ()> + Send>>) {
|
||||
self.0.spawn(f, "libp2p");
|
||||
|
||||
Reference in New Issue
Block a user