async fn sync_to(&self, target: LedgerInfoWithSignatures) -> Result<()> {
        counters::STATE_SYNC_COUNT.inc();
        // Here to start to do state synchronization where ChunkExecutor inside will
        // process chunks and commit to Storage. However, after block execution and
        // commitments, the the sync state of ChunkExecutor may be not up to date so
        // it is required to reset the cache of ChunkExecutor in StateSynchronizer
        // when requested to sync.
        let res = self.synchronizer.sync_to(target).await;
        // Similarily, after the state synchronization, we have to reset the cache
        // of BlockExecutor to guarantee the latest committed state is up to date.
        self.execution_correctness_client.lock().unwrap().reset()?;
        res
    }
/// Synchronize to a commit that not present locally.
Synchronize to a commit that not present locally.
Synchronize to a commit that not present locally .
async fn sync_to(&self, target: LedgerInfoWithSignatures) -> Result<()> {
        counters::STATE_SYNC_COUNT.inc();
        // Here to start to do state synchronization where ChunkExecutor inside will
        // process chunks and commit to Storage. However, after block execution and
        // commitments, the the sync state of ChunkExecutor may be not up to date so
        // it is required to reset the cache of ChunkExecutor in StateSynchronizer
        // when requested to sync.
        let res = self.synchronizer.sync_to(target).await;
        // Similarily, after the state synchronization, we have to reset the cache
        // of BlockExecutor to guarantee the latest committed state is up to date.
        self.execution_correctness_client.lock().unwrap().reset()?;
        res
    }
async fn sync_to ( & self , target : LedgerInfoWithSignatures ) -> Result < ( ) > { counters :: STATE_SYNC_COUNT . inc ( ) ; // Here to start to do state synchronization where ChunkExecutor inside will // process chunks and commit to Storage. However, after block execution and // commitments, the the sync state of ChunkExecutor may be not up to date so // it is required to reset the cache of ChunkExecutor in StateSynchronizer // when requested to sync. let res = self . synchronizer . sync_to ( target ) . await ; // Similarily, after the state synchronization, we have to reset the cache // of BlockExecutor to guarantee the latest committed state is up to date. self . execution_correctness_client . lock ( ) . unwrap ( ) . reset ( ) ? ; res }
Synchronize to a commit that not present locally.
Synchronize to a commit that not present locally .
&self
target
LedgerInfoWithSignatures
&self
target
LedgerInfoWithSignatures