forked from forks/go-ethereum
cmd/geth: print crit log if chain config is not compatible (#31743)
This commit is contained in:
parent
947fd3a834
commit
ba0a61bc28
1 changed files with 4 additions and 1 deletions
|
|
@ -246,10 +246,13 @@ func initGenesis(ctx *cli.Context) error {
|
|||
triedb := utils.MakeTrieDatabase(ctx, chaindb, ctx.Bool(utils.CachePreimagesFlag.Name), false, genesis.IsVerkle())
|
||||
defer triedb.Close()
|
||||
|
||||
_, hash, _, err := core.SetupGenesisBlockWithOverride(chaindb, triedb, genesis, &overrides)
|
||||
_, hash, compatErr, err := core.SetupGenesisBlockWithOverride(chaindb, triedb, genesis, &overrides)
|
||||
if err != nil {
|
||||
utils.Fatalf("Failed to write genesis block: %v", err)
|
||||
}
|
||||
if compatErr != nil {
|
||||
utils.Fatalf("Failed to write chain config: %v", err)
|
||||
}
|
||||
log.Info("Successfully wrote genesis state", "database", "chaindata", "hash", hash)
|
||||
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Reference in a new issue