mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 05:06:43 +00:00
cmd: rename genesis flag to override.genesis
This commit is contained in:
parent
caf1b2a7a3
commit
23740764e7
2 changed files with 9 additions and 9 deletions
|
|
@ -66,6 +66,7 @@ var (
|
|||
utils.OverrideBPO1,
|
||||
utils.OverrideBPO2,
|
||||
utils.OverrideVerkle,
|
||||
utils.OverrideGenesisFlag,
|
||||
utils.EnablePersonal, // deprecated
|
||||
utils.TxPoolLocalsFlag,
|
||||
utils.TxPoolNoLocalsFlag,
|
||||
|
|
@ -84,7 +85,6 @@ var (
|
|||
utils.SyncModeFlag,
|
||||
utils.SyncTargetFlag,
|
||||
utils.ExitWhenSyncedFlag,
|
||||
utils.GenesisFlag,
|
||||
utils.GCModeFlag,
|
||||
utils.SnapshotFlag,
|
||||
utils.TxLookupLimitFlag, // deprecated
|
||||
|
|
|
|||
|
|
@ -190,11 +190,6 @@ var (
|
|||
Usage: "Exits after block synchronisation completes",
|
||||
Category: flags.EthCategory,
|
||||
}
|
||||
GenesisFlag = &cli.StringFlag{
|
||||
Name: "genesis",
|
||||
Usage: "Load genesis block and configuration from file at this path",
|
||||
Category: flags.EthCategory,
|
||||
}
|
||||
|
||||
// Dump command options.
|
||||
IterativeOutputFlag = &cli.BoolFlag{
|
||||
|
|
@ -267,6 +262,11 @@ var (
|
|||
Usage: "Manually specify the Verkle fork timestamp, overriding the bundled setting",
|
||||
Category: flags.EthCategory,
|
||||
}
|
||||
OverrideGenesisFlag = &cli.StringFlag{
|
||||
Name: "override.genesis",
|
||||
Usage: "Load genesis block and configuration from file at this path",
|
||||
Category: flags.EthCategory,
|
||||
}
|
||||
SyncModeFlag = &cli.StringFlag{
|
||||
Name: "syncmode",
|
||||
Usage: `Blockchain sync mode ("snap" or "full")`,
|
||||
|
|
@ -1598,7 +1598,7 @@ func setRequiredBlocks(ctx *cli.Context, cfg *ethconfig.Config) {
|
|||
// SetEthConfig applies eth-related command line flags to the config.
|
||||
func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
|
||||
// Avoid conflicting network flags, don't allow network id override on preset networks
|
||||
flags.CheckExclusive(ctx, MainnetFlag, DeveloperFlag, SepoliaFlag, HoleskyFlag, HoodiFlag, NetworkIdFlag, GenesisFlag)
|
||||
flags.CheckExclusive(ctx, MainnetFlag, DeveloperFlag, SepoliaFlag, HoleskyFlag, HoodiFlag, NetworkIdFlag, OverrideGenesisFlag)
|
||||
flags.CheckExclusive(ctx, DeveloperFlag, ExternalSignerFlag) // Can't use both ephemeral unlocked and external signer
|
||||
|
||||
// Set configurations from CLI flags
|
||||
|
|
@ -1878,8 +1878,8 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
|
|||
if !ctx.IsSet(MinerGasPriceFlag.Name) {
|
||||
cfg.Miner.GasPrice = big.NewInt(1)
|
||||
}
|
||||
case ctx.String(GenesisFlag.Name) != "":
|
||||
f, err := os.Open(ctx.String(GenesisFlag.Name))
|
||||
case ctx.String(OverrideGenesisFlag.Name) != "":
|
||||
f, err := os.Open(ctx.String(OverrideGenesisFlag.Name))
|
||||
if err != nil {
|
||||
Fatalf("Failed to read genesis file: %v", err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue