remove on_exit from grandpa (#5098)

This commit is contained in:
Gavin Wood
2020-03-05 13:38:16 +01:00
committed by GitHub
parent 91b44299d8
commit ab58a08a53
5 changed files with 7 additions and 30 deletions
@@ -159,8 +159,8 @@ pub fn run_grandpa_observer<BE, Block: BlockT, Client, N, SC>(
config: Config,
link: LinkHalf<Block, Client, SC>,
network: N,
on_exit: impl futures::Future<Output=()> + Clone + Send + Unpin + 'static,
) -> sp_blockchain::Result<impl Future<Output = ()> + Unpin + Send + 'static> where
) -> sp_blockchain::Result<impl Future<Output = ()> + Unpin + Send + 'static>
where
BE: Backend<Block> + Unpin + 'static,
N: NetworkT<Block> + Send + Clone + 'static,
SC: SelectChain<Block> + 'static,
@@ -194,7 +194,7 @@ pub fn run_grandpa_observer<BE, Block: BlockT, Client, N, SC>(
warn!("GRANDPA Observer failed: {:?}", e);
});
Ok(future::select(observer_work, on_exit).map(drop))
Ok(observer_work.map(drop))
}
/// Future that powers the observer.