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

@@ -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.