Skip to content

Commit

Permalink
add comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
raulk committed Jul 22, 2024
1 parent 27b1a67 commit e66910b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fendermint/vm/interpreter/src/fvm/checkpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,8 @@ where
.ok_or_else(|| anyhow!("block hash not set"))?;

// Check if the checkpoint has been finalized.
// If no checkpoint was emitted at this height, the QuorumInfo struct will carry zero values,
// including reached=false.
let checkpoint_quorum = gateway.checkpoint_info(state, block_height)?;

if checkpoint_quorum.reached {
Expand Down
1 change: 1 addition & 0 deletions fendermint/vm/interpreter/src/fvm/exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ where
}

async fn end(&self, mut state: Self::State) -> anyhow::Result<(Self::State, Self::EndOutput)> {
// TODO: Consider doing this async, since it's purely informational and not consensus-critical.
let _ = checkpoint::emit_trace_if_check_checkpoint_finalized(&self.gateway, &mut state)
.inspect_err(|e| {
emit(TracingError {
Expand Down

0 comments on commit e66910b

Please sign in to comment.