pause relays(s) when node is syncing (#605)

This commit is contained in:
Svyatoslav Nikolsky
2021-02-02 13:27:18 +03:00
committed by Bastian Köcher
parent 8ee90afae6
commit 8953967d92
15 changed files with 93 additions and 6 deletions
@@ -73,6 +73,8 @@ where
P::Header: SourceHeader<C::Hash, C::BlockNumber>,
{
async fn best_block_number(&self) -> Result<P::Number, Error> {
// we **CAN** continue to relay headers if source node is out of sync, because
// target node may be missing headers that are already available at the source
Ok(*self.client.best_header().await?.number())
}