async fn commit(
        &self,
        block_ids: Vec<HashValue>,
        finality_proof: LedgerInfoWithSignatures,
    ) -> Result<()> {
        let version = finality_proof.ledger_info().version();
        counters::LAST_COMMITTED_VERSION.set(version as i64);

        let pre_commit_instant = Instant::now();

        let (committed_txns, reconfig_events) = self
            .execution_correctness_client
            .lock()
            .unwrap()
            .commit_blocks(block_ids, finality_proof)?;
        counters::BLOCK_COMMIT_DURATION_S.observe_duration(pre_commit_instant.elapsed());
        if let Err(e) = self
            .synchronizer
            .commit(committed_txns, reconfig_events)
            .await
        {
            error!("failed to notify state synchronizer: {:?}", e);
        }
        Ok(())
    }
/// Send a successful commit. A future is fulfilled when the state is finalized.
Send a successful commit. A future is fulfilled when the state is finalized.
Send a successful commit . A future is fulfilled when the state is finalized .
async fn commit(
        &self,
        block_ids: Vec<HashValue>,
        finality_proof: LedgerInfoWithSignatures,
    ) -> Result<()> {
        let version = finality_proof.ledger_info().version();
        counters::LAST_COMMITTED_VERSION.set(version as i64);
        let pre_commit_instant = Instant::now();
        let (committed_txns, reconfig_events) = self
            .execution_correctness_client
            .lock()
            .unwrap()
            .commit_blocks(block_ids, finality_proof)?;
        counters::BLOCK_COMMIT_DURATION_S.observe_duration(pre_commit_instant.elapsed());
        if let Err(e) = self
            .synchronizer
            .commit(committed_txns, reconfig_events)
            .await
        {
            error!("failed to notify state synchronizer: {:?}", e);
        }
        Ok(())
    }
async fn commit ( & self , block_ids : Vec < HashValue > , finality_proof : LedgerInfoWithSignatures , ) -> Result < ( ) > { let version = finality_proof . ledger_info ( ) . version ( ) ; counters :: LAST_COMMITTED_VERSION . set ( version as i64 ) ; let pre_commit_instant = Instant :: now ( ) ; let ( committed_txns , reconfig_events ) = self . execution_correctness_client . lock ( ) . unwrap ( ) . commit_blocks ( block_ids , finality_proof ) ? ; counters :: BLOCK_COMMIT_DURATION_S . observe_duration ( pre_commit_instant . elapsed ( ) ) ; if let Err ( e ) = self . synchronizer . commit ( committed_txns , reconfig_events ) . await { error ! ( " " e ) ; } Ok ( ( ) ) }
Send a successful commit.
Send a successful commit .
&self
block_ids
Vec<HashValue>
finality_proof
LedgerInfoWithSignatures
&self
block_ids
Vec<HashValue>
finality_proof
LedgerInfoWithSignatures