Skip to content

Commit

Permalink
simplify dkg oncommit logic
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanschalm committed Jan 17, 2025
1 parent f0c22c5 commit a188c37
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions engine/consensus/dkg/reactor_engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,13 +284,13 @@ func (e *ReactorEngine) handleEpochCommittedPhaseStarted(currentEpochCounter uin

return
}
if currentState == flow.RandomBeaconKeyCommitted {
// this can happen if a healthy node which succeeded the DKG restarts in the EpochCommit phase
log.Debug().Msg("checking beacon key consistency after EpochCommit: observed committed beacon key for most recent dkg - exiting")
return
}
if currentState != flow.DKGStateCompleted {
log.Warn().Msgf("checking beacon key consistency after EpochCommit: exiting because dkg didn't reach completed state: %s", currentState.String())
if currentState == flow.RandomBeaconKeyCommitted {
// this can happen if a healthy node which succeeded the DKG restarts in the EpochCommit phase
log.Debug().Msg("checking beacon key consistency after EpochCommit: observed committed beacon key for most recent dkg - exiting")
} else {
log.Warn().Msgf("checking beacon key consistency after EpochCommit: exiting because dkg didn't reach completed state: %s", currentState.String())
}
return
}
snapshot := e.State.AtBlockID(firstBlock.ID())
Expand Down

0 comments on commit a188c37

Please sign in to comment.