remove reversion

This commit is contained in:
Jared Wasinger 2025-05-29 12:17:32 +08:00
parent dc2ba5ed64
commit c9d5208610

View file

@ -1801,6 +1801,9 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
if ctx.IsSet(DataDirFlag.Name) {
chaindb := tryMakeReadOnlyDatabase(ctx, stack)
if rawdb.ReadCanonicalHash(chaindb, 0) != (common.Hash{}) {
// signal fallback to preexisting chain on disk
cfg.Genesis = nil
genesis, err := core.ReadGenesis(chaindb)
if err != nil {
Fatalf("Could not read genesis from database: %v", err)