Finality loop refactoring (#2357)

This commit is contained in:
Serban Iorga
2023-08-16 12:42:51 +03:00
committed by Bastian Köcher
parent 48cae06a77
commit dc8aa5df7d
9 changed files with 1268 additions and 1221 deletions
@@ -125,7 +125,7 @@ impl<P: SubstrateFinalitySyncPipeline> SubstrateFinalitySource<P> {
Error,
> {
let client = self.client.clone();
let best_finalized_block_number = self.client.best_finalized_header_number().await?;
let best_finalized_block_number = client.best_finalized_header_number().await?;
Ok(try_unfold((client, block_number), move |(client, current_block_number)| async move {
// if we've passed the `best_finalized_block_number`, we no longer need persistent
// justifications