Port beacon_chain to stable futures

This commit is contained in:
pawan
2020-03-01 02:06:38 +05:30
committed by Age Manning
parent d778e7346e
commit decd29adfb
2 changed files with 3 additions and 7 deletions

View File

@@ -35,7 +35,7 @@ types = { path = "../../eth2/types" }
tokio = "0.1.22"
eth1 = { path = "../eth1" }
websocket_server = { path = "../websocket_server" }
futures = "0.1.25"
futures = "0.3"
genesis = { path = "../genesis" }
integer-sqrt = "0.1"
rand = "0.7.2"

View File

@@ -1,7 +1,6 @@
use crate::metrics;
use eth1::{Config as Eth1Config, Eth1Block, Service as HttpService};
use eth2_hashing::hash;
use futures::Future;
use slog::{debug, error, trace, Logger};
use ssz::{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.
pub fn start(
&self,
exit: tokio::sync::oneshot::Receiver<()>,
) -> impl Future<Item = (), Error = ()> {
self.core.auto_update(exit)
pub async fn start(&self, exit: tokio::sync::oneshot::Receiver<()>) -> Result<(), ()> {
self.core.auto_update(exit).await
}
/// Instantiates `self` from an existing service.