Invert State Locks Flag (#6922)

* invert flag

* Update shared/featureconfig/flags.go

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
Nishant Das
2020-08-10 13:10:41 +08:00
committed by GitHub
parent 6d5b7b0439
commit 649bfb58e5
2 changed files with 15 additions and 8 deletions

View File

@@ -228,9 +228,11 @@ func ConfigureBeaconChain(ctx *cli.Context) {
cfg.DisableGRPCConnectionLogs = true
}
cfg.AttestationAggregationStrategy = ctx.String(attestationAggregationStrategy.Name)
if ctx.Bool(newBeaconStateLocks.Name) {
log.Warn("Using new beacon state locks")
cfg.NewBeaconStateLocks = true
cfg.NewBeaconStateLocks = true
if ctx.Bool(disableNewBeaconStateLocks.Name) {
log.Warn("Disabling new beacon state locks")
cfg.NewBeaconStateLocks = false
}
if ctx.Bool(forceMaxCoverAttestationAggregation.Name) {
log.Warn("Forcing max_cover strategy on attestation aggregation")

View File

@@ -138,9 +138,9 @@ var (
Usage: "Which strategy to use when aggregating attestations, one of: naive, max_cover.",
Value: "naive",
}
newBeaconStateLocks = &cli.BoolFlag{
Name: "new-beacon-state-locks",
Usage: "Enable new beacon state locking",
disableNewBeaconStateLocks = &cli.BoolFlag{
Name: "disable-new-beacon-state-locks",
Usage: "Disable new beacon state locking",
}
forceMaxCoverAttestationAggregation = &cli.BoolFlag{
Name: "attestation-aggregation-force-maxcover",
@@ -171,7 +171,6 @@ var (
// devModeFlags holds list of flags that are set when development mode is on.
var devModeFlags = []cli.Flag{
forceMaxCoverAttestationAggregation,
newBeaconStateLocks,
batchBlockVerify,
}
@@ -515,6 +514,11 @@ var (
Usage: deprecatedUsage,
Hidden: true,
}
deprecatedNewBeaconStateLocks = &cli.BoolFlag{
Name: "new-beacon-state-locks",
Usage: deprecatedUsage,
Hidden: true,
}
)
var deprecatedFlags = []cli.Flag{
@@ -585,6 +589,7 @@ var deprecatedFlags = []cli.Flag{
deprecatedMedallaTestnet,
deprecatedEnableAccountsV2,
deprecatedCustomGenesisDelay,
deprecatedNewBeaconStateLocks,
}
// ValidatorFlags contains a list of all the feature flags that apply to the validator client.
@@ -635,7 +640,7 @@ var BeaconChainFlags = append(deprecatedFlags, []cli.Flag{
disableReduceAttesterStateCopy,
disableGRPCConnectionLogging,
attestationAggregationStrategy,
newBeaconStateLocks,
disableNewBeaconStateLocks,
forceMaxCoverAttestationAggregation,
AltonaTestnet,
OnyxTestnet,