From a188c37ca0e1777dbced8908de026b8c36bf9682 Mon Sep 17 00:00:00 2001 From: Jordan Schalm Date: Fri, 17 Jan 2025 09:30:24 -0800 Subject: [PATCH] simplify dkg oncommit logic --- engine/consensus/dkg/reactor_engine.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/engine/consensus/dkg/reactor_engine.go b/engine/consensus/dkg/reactor_engine.go index 4ac757b3736..c531cd14909 100644 --- a/engine/consensus/dkg/reactor_engine.go +++ b/engine/consensus/dkg/reactor_engine.go @@ -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())