added ovveride merge fork block (#4027)

This commit is contained in:
Giulio rebuffo 2022-04-29 18:27:17 +02:00 committed by GitHub
parent 77560b6732
commit af5bdceb14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -138,6 +138,10 @@ var (
Name: "override.terminaltotaldifficulty",
Usage: "Manually specify TerminalTotalDifficulty, overriding the bundled setting",
}
OverrideMergeForkBlock = BigFlag{
Name: "override.mergeForkBlock",
Usage: "Manually specify TerminalTotalDifficulty, overriding the bundled setting",
}
// Ethash settings
EthashCachesInMemoryFlag = cli.IntFlag{
Name: "ethash.cachesinmem",
@ -1500,6 +1504,9 @@ func SetEthConfig(ctx *cli.Context, nodeConfig *node.Config, cfg *ethconfig.Conf
if ctx.GlobalIsSet(OverrideTerminalTotalDifficulty.Name) {
cfg.Genesis.Config.TerminalTotalDifficulty = GlobalBig(ctx, OverrideTerminalTotalDifficulty.Name)
}
if ctx.GlobalIsSet(OverrideMergeForkBlock.Name) {
cfg.Genesis.Config.MergeForkBlock = GlobalBig(ctx, OverrideMergeForkBlock.Name)
}
}
// SetDNSDiscoveryDefaults configures DNS discovery with the given URL if

View File

@ -125,4 +125,5 @@ var DefaultFlags = []cli.Flag{
utils.WithoutHeimdallFlag,
utils.EthStatsURLFlag,
utils.OverrideTerminalTotalDifficulty,
utils.OverrideMergeForkBlock,
}