also apply overrides before genesis commit with new block

This commit is contained in:
Guillaume Ballet 2023-10-24 13:28:04 +02:00
parent b94e602209
commit e7a1de66cc

View file

@ -320,11 +320,11 @@ func SetupGenesisBlockWithOverride(db ethdb.Database, triedb *trie.Database, gen
} else { } else {
log.Info("Writing custom genesis block") log.Info("Writing custom genesis block")
} }
applyOverrides(genesis.Config)
block, err := genesis.Commit(db, triedb) block, err := genesis.Commit(db, triedb)
if err != nil { if err != nil {
return genesis.Config, common.Hash{}, err return genesis.Config, common.Hash{}, err
} }
applyOverrides(genesis.Config)
return genesis.Config, block.Hash(), nil return genesis.Config, block.Hash(), nil
} }
// The genesis block is present(perhaps in ancient database) while the // The genesis block is present(perhaps in ancient database) while the