Skip to content

Commit 9ace5b4

Browse files
committed
use minimumNonceToStartEpoch = 4 for minimum blocks per epoch check
1 parent b7e4cfb commit 9ace5b4

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

epochStart/metachain/trigger.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ var _ process.EpochBootstrapper = (*trigger)(nil)
3333
var _ closing.Closer = (*trigger)(nil)
3434

3535
const minimumNonceToStartEpoch = 4
36-
const minimumBlocksPerEpoch = 2
3736
const disabledRoundForForceEpochStart = math.MaxUint64
3837

3938
// ArgsNewMetaEpochStartTrigger defines struct needed to create a new start of epoch trigger
@@ -211,7 +210,7 @@ func (t *trigger) Update(round uint64, nonce uint64) {
211210

212211
isZeroEpochEdgeCase := nonce < minimumNonceToStartEpoch
213212
epochStartNonce := t.epochStartMeta.GetNonce()
214-
hasMinBlocksInEpoch := nonce >= epochStartNonce+minimumBlocksPerEpoch
213+
hasMinBlocksInEpoch := nonce >= epochStartNonce+minimumNonceToStartEpoch
215214
isNormalEpochStart := t.currentRound > t.currEpochStartRound+t.roundsPerEpoch
216215
isWithEarlyEndOfEpoch := t.currentRound >= t.nextEpochStartRound
217216
shouldTriggerEpochStart := (isNormalEpochStart || isWithEarlyEndOfEpoch) && !isZeroEpochEdgeCase && hasMinBlocksInEpoch

0 commit comments

Comments
 (0)