Merge pull request #20004 from karalabe/istanbul-override

cmd, core, eth, les: support --override.istanbul
This commit is contained in:
Péter Szilágyi
2019-08-23 12:38:05 +03:00
committed by GitHub
7 changed files with 21 additions and 2 deletions

View File

@ -20,6 +20,7 @@ import (
"bufio"
"errors"
"fmt"
"math/big"
"os"
"reflect"
"unicode"
@ -150,6 +151,9 @@ func enableWhisper(ctx *cli.Context) bool {
func makeFullNode(ctx *cli.Context) *node.Node {
stack, cfg := makeConfigNode(ctx)
if ctx.GlobalIsSet(utils.OverrideIstanbulFlag.Name) {
cfg.Eth.OverrideIstanbul = new(big.Int).SetUint64(ctx.GlobalUint64(utils.OverrideIstanbulFlag.Name))
}
utils.RegisterEthService(stack, &cfg.Eth)
if ctx.GlobalBool(utils.DashboardEnabledFlag.Name) {

View File

@ -69,6 +69,7 @@ var (
utils.ExternalSignerFlag,
utils.NoUSBFlag,
utils.SmartCardDaemonPathFlag,
utils.OverrideIstanbulFlag,
utils.DashboardEnabledFlag,
utils.DashboardAddrFlag,
utils.DashboardPortFlag,

View File

@ -223,6 +223,10 @@ var (
Name: "whitelist",
Usage: "Comma separated block number-to-hash mappings to enforce (<number>=<hash>)",
}
OverrideIstanbulFlag = cli.Uint64Flag{
Name: "override.istanbul",
Usage: "Manually specify Istanbul fork-block, overriding the bundled setting",
}
// Light server and client settings
LightLegacyServFlag = cli.IntFlag{ // Deprecated in favor of light.serve, remove in 2021
Name: "lightserv",