rm unused `lowParticipation` flag (#4624)
Remove an unused flag and associated (unreachable) logic, as the flag wasn't even passed to that module.
This commit is contained in:
parent
cf551f10c4
commit
1ac7f1a47a
|
@ -922,7 +922,7 @@ proc init*(T: type ChainDAGRef, cfg: RuntimeConfig, db: BeaconChainDB,
|
|||
cfg.checkForkConsistency()
|
||||
|
||||
doAssert updateFlags - {
|
||||
strictVerification, experimental, enableTestFeatures, lowParticipation
|
||||
strictVerification, experimental, enableTestFeatures
|
||||
} == {}, "Other flags not supported in ChainDAG"
|
||||
|
||||
# TODO we require that the db contains both a head and a tail block -
|
||||
|
@ -952,7 +952,7 @@ proc init*(T: type ChainDAGRef, cfg: RuntimeConfig, db: BeaconChainDB,
|
|||
# The only allowed flag right now is strictVerification, as the others all
|
||||
# allow skipping some validation.
|
||||
updateFlags: updateFlags * {
|
||||
strictVerification, experimental, enableTestFeatures, lowParticipation
|
||||
strictVerification, experimental, enableTestFeatures
|
||||
},
|
||||
cfg: cfg,
|
||||
|
||||
|
|
|
@ -40,7 +40,5 @@ type
|
|||
## Whether to enable extra features in development.
|
||||
enableTestFeatures ##\
|
||||
## Whether to enable extra features for testing.
|
||||
lowParticipation ##\
|
||||
## Whether the network is prone to low participation.
|
||||
|
||||
UpdateFlags* = set[UpdateFlag]
|
||||
|
|
|
@ -177,11 +177,6 @@ func applyScoreChanges*(self: var ProtoArray,
|
|||
self.currentEpoch = currentEpoch
|
||||
self.checkpoints = checkpoints
|
||||
|
||||
# If previous epoch is justified, pull up all current tips to previous epoch
|
||||
if self.experimental and self.isPreviousEpochJustified:
|
||||
for realized in self.realizePendingCheckpoints(resetTipTracking = false):
|
||||
discard
|
||||
|
||||
## Alias
|
||||
# This cannot raise the IndexError exception, how to tell compiler?
|
||||
template node: untyped {.dirty.} =
|
||||
|
@ -546,16 +541,6 @@ func nodeIsViableForHead(
|
|||
if node.invalid:
|
||||
return false
|
||||
|
||||
if self.hasLowParticipation:
|
||||
return
|
||||
if node.checkpoints.justified.epoch < self.checkpoints.justified.epoch:
|
||||
false
|
||||
elif self.isPreviousEpochJustified:
|
||||
node.checkpoints.finalized.epoch >= self.checkpoints.finalized.epoch
|
||||
else:
|
||||
node.checkpoints.finalized == self.checkpoints.finalized or
|
||||
self.checkpoints.finalized.epoch == GENESIS_EPOCH
|
||||
|
||||
if self.experimental:
|
||||
var correctJustified =
|
||||
self.checkpoints.justified.epoch == GENESIS_EPOCH or
|
||||
|
|
|
@ -172,8 +172,6 @@ proc loadChainDag(
|
|||
var extraFlags = {enableTestFeatures}
|
||||
if config.deploymentPhase <= DeploymentPhase.Testnet:
|
||||
extraFlags.incl experimental
|
||||
if config.deploymentPhase <= DeploymentPhase.Devnet:
|
||||
extraFlags.incl lowParticipation
|
||||
let
|
||||
chainDagFlags =
|
||||
if config.strictVerification: {strictVerification}
|
||||
|
|
Loading…
Reference in New Issue