async fn commit(
        &self,
        blocks: &[Arc<ExecutedBlock>],
        finality_proof: LedgerInfoWithSignatures,
        callback: StateComputerCommitCallBackType,
    ) -> Result<(), ExecutionError> {
        let mut block_ids = Vec::new();
        let mut txns = Vec::new();
        let mut reconfig_events = Vec::new();

        for block in blocks {
            block_ids.push(block.id());
            txns.extend(block.transactions_to_commit());
            reconfig_events.extend(block.reconfig_event());
        }

        monitor!(
            "commit_block",
            self.execution_correctness_client
                .commit_blocks(block_ids, finality_proof.clone())?
        );

        if let Err(e) = monitor!(
            "notify_state_sync",
            self.state_sync_notifier
                .notify_new_commit(txns, reconfig_events)
                .await
        ) {
            error!(error = ?e, "Failed to notify state synchronizer");
        }

        callback(blocks, finality_proof);

        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,
        blocks: &[Arc<ExecutedBlock>],
        finality_proof: LedgerInfoWithSignatures,
        callback: StateComputerCommitCallBackType,
    ) -> Result<(), ExecutionError> {
        let mut block_ids = Vec::new();
        let mut txns = Vec::new();
        let mut reconfig_events = Vec::new();
        for block in blocks {
            block_ids.push(block.id());
            txns.extend(block.transactions_to_commit());
            reconfig_events.extend(block.reconfig_event());
        }
        monitor!(
            "commit_block",
            self.execution_correctness_client
                .commit_blocks(block_ids, finality_proof.clone())?
        );
        if let Err(e) = monitor!(
            "notify_state_sync",
            self.state_sync_notifier
                .notify_new_commit(txns, reconfig_events)
                .await
        ) {
            error!(error = ?e, "Failed to notify state synchronizer");
        }
        callback(blocks, finality_proof);
        Ok(())
    }
async fn commit ( & self , blocks : & [ Arc < ExecutedBlock > ] , finality_proof : LedgerInfoWithSignatures , callback : StateComputerCommitCallBackType , ) -> Result < ( ) , ExecutionError > { let mut block_ids = Vec :: new ( ) ; let mut txns = Vec :: new ( ) ; let mut reconfig_events = Vec :: new ( ) ; for block in blocks { block_ids . push ( block . id ( ) ) ; txns . extend ( block . transactions_to_commit ( ) ) ; reconfig_events . extend ( block . reconfig_event ( ) ) ; } monitor ! ( " " self execution_correctness_client commit_blocks ( block_ids finality_proof clone ( ) ) ) ; if let Err ( e ) = monitor ! ( " " self state_sync_notifier notify_new_commit ( txns reconfig_events ) await ) { error ! ( error e " " ) ; } callback ( blocks , finality_proof ) ; Ok ( ( ) ) }
Send a successful commit.
Send a successful commit .
&self
blocks
&[Arc<ExecutedBlock>]
finality_proof
LedgerInfoWithSignatures
callback
StateComputerCommitCallBackType
&self
blocks
&[Arc<ExecutedBlock>]
finality_proof
LedgerInfoWithSignatures
callback
StateComputerCommitCallBackType