/// Perform reconciliation steps until there are blocks to yield or we are up-to-date.
Perform reconciliation steps until there are blocks to yield or we are up-to-date.
Perform reconciliation steps until there are blocks to yield or we are up - to - date .
async fn next_blocks(&self) -> Result<NextBlocks<C>, Error> {
        let ctx = self.clone();
        loop {
            match ctx.get_next_step().await? {
                ReconciliationStep::ProcessDescendantBlocks(next_blocks, range_size) => {
                    return Ok(NextBlocks::Blocks(
                        next_blocks.into_iter().collect(),
                        range_size,
                    ));
                }
                ReconciliationStep::Retry => {
                    continue;
                }
                ReconciliationStep::Done => {
                    // Reconciliation is complete, so try to mark subgraph as Synced
                    ctx.update_subgraph_synced_status()?;
                    return Ok(NextBlocks::Done);
                }
                ReconciliationStep::Revert(block) => return Ok(NextBlocks::Revert(block)),
            }
        }
    }
async fn next_blocks ( & self ) -> Result < NextBlocks < C > , Error > { let ctx = self . clone ( ) ; loop { match ctx . get_next_step ( ) . await ? { ReconciliationStep :: ProcessDescendantBlocks ( next_blocks , range_size ) => { return Ok ( NextBlocks :: Blocks ( next_blocks . into_iter ( ) . collect ( ) , range_size , ) ) ; } ReconciliationStep :: Retry => { continue ; } ReconciliationStep :: Done => { // Reconciliation is complete, so try to mark subgraph as Synced ctx . update_subgraph_synced_status ( ) ? ; return Ok ( NextBlocks :: Done ) ; } ReconciliationStep :: Revert ( block ) => return Ok ( NextBlocks :: Revert ( block ) ) , } } }
Perform reconciliation steps until there are blocks to yield or we are up-to-date.
Perform reconciliation steps until there are blocks to yield or we are up - to - date .
&self