mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-26 15:47:21 +00:00
cmd/utils: fix formatting for beacon flag errors to fit Fatalf form (#32090)
Noticed that the errors for the blsync flags were not formatted correctly for `Fatalf(..)`.
This commit is contained in:
parent
cafa5e6c12
commit
429e821fa2
1 changed files with 5 additions and 5 deletions
|
|
@ -1891,11 +1891,11 @@ func MakeBeaconLightConfig(ctx *cli.Context) bparams.ClientConfig {
|
|||
if c, err := hexutil.Decode(ctx.String(BeaconGenesisRootFlag.Name)); err == nil && len(c) <= 32 {
|
||||
copy(config.GenesisValidatorsRoot[:len(c)], c)
|
||||
} else {
|
||||
Fatalf("Invalid hex string", "beacon.genesis.gvroot", ctx.String(BeaconGenesisRootFlag.Name), "error", err)
|
||||
Fatalf("Could not parse --%s: %v", BeaconGenesisRootFlag.Name, err)
|
||||
}
|
||||
configFile := ctx.String(BeaconConfigFlag.Name)
|
||||
if err := config.ChainConfig.LoadForks(configFile); err != nil {
|
||||
Fatalf("Could not load beacon chain config", "file", configFile, "error", err)
|
||||
Fatalf("Could not load beacon chain config '%s': %v", configFile, err)
|
||||
}
|
||||
log.Info("Using custom beacon chain config", "file", configFile)
|
||||
} else {
|
||||
|
|
@ -1912,17 +1912,17 @@ func MakeBeaconLightConfig(ctx *cli.Context) bparams.ClientConfig {
|
|||
// are saved to the specified file.
|
||||
if ctx.IsSet(BeaconCheckpointFileFlag.Name) {
|
||||
if _, err := config.SetCheckpointFile(ctx.String(BeaconCheckpointFileFlag.Name)); err != nil {
|
||||
Fatalf("Could not load beacon checkpoint file", "beacon.checkpoint.file", ctx.String(BeaconCheckpointFileFlag.Name), "error", err)
|
||||
Fatalf("Could not load beacon checkpoint file '%s': %v", ctx.String(BeaconCheckpointFileFlag.Name), err)
|
||||
}
|
||||
}
|
||||
if ctx.IsSet(BeaconCheckpointFlag.Name) {
|
||||
hex := ctx.String(BeaconCheckpointFlag.Name)
|
||||
c, err := hexutil.Decode(hex)
|
||||
if err != nil {
|
||||
Fatalf("Invalid hex string", "beacon.checkpoint", hex, "error", err)
|
||||
Fatalf("Could not parse --%s: %v", BeaconCheckpointFlag.Name, err)
|
||||
}
|
||||
if len(c) != 32 {
|
||||
Fatalf("Invalid hex string length", "beacon.checkpoint", hex, "length", len(c))
|
||||
Fatalf("Could not parse --%s: invalid length %d, want 32", BeaconCheckpointFlag.Name, len(c))
|
||||
}
|
||||
copy(config.Checkpoint[:len(c)], c)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue