mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-08 09:16:00 +00:00
Port beacon_chain to stable futures
This commit is contained in:
@@ -35,7 +35,7 @@ types = { path = "../../eth2/types" }
|
|||||||
tokio = "0.1.22"
|
tokio = "0.1.22"
|
||||||
eth1 = { path = "../eth1" }
|
eth1 = { path = "../eth1" }
|
||||||
websocket_server = { path = "../websocket_server" }
|
websocket_server = { path = "../websocket_server" }
|
||||||
futures = "0.1.25"
|
futures = "0.3"
|
||||||
genesis = { path = "../genesis" }
|
genesis = { path = "../genesis" }
|
||||||
integer-sqrt = "0.1"
|
integer-sqrt = "0.1"
|
||||||
rand = "0.7.2"
|
rand = "0.7.2"
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
use crate::metrics;
|
use crate::metrics;
|
||||||
use eth1::{Config as Eth1Config, Eth1Block, Service as HttpService};
|
use eth1::{Config as Eth1Config, Eth1Block, Service as HttpService};
|
||||||
use eth2_hashing::hash;
|
use eth2_hashing::hash;
|
||||||
use futures::Future;
|
|
||||||
use slog::{debug, error, trace, Logger};
|
use slog::{debug, error, trace, Logger};
|
||||||
use ssz::{Decode, Encode};
|
use ssz::{Decode, Encode};
|
||||||
use ssz_derive::{Decode, Encode};
|
use ssz_derive::{Decode, Encode};
|
||||||
@@ -278,11 +277,8 @@ impl<T: EthSpec, S: Store<T>> CachingEth1Backend<T, S> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Starts the routine which connects to the external eth1 node and updates the caches.
|
/// Starts the routine which connects to the external eth1 node and updates the caches.
|
||||||
pub fn start(
|
pub async fn start(&self, exit: tokio::sync::oneshot::Receiver<()>) -> Result<(), ()> {
|
||||||
&self,
|
self.core.auto_update(exit).await
|
||||||
exit: tokio::sync::oneshot::Receiver<()>,
|
|
||||||
) -> impl Future<Item = (), Error = ()> {
|
|
||||||
self.core.auto_update(exit)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Instantiates `self` from an existing service.
|
/// Instantiates `self` from an existing service.
|
||||||
|
|||||||
Reference in New Issue
Block a user