mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-26 15:47:21 +00:00
core: apply overrides to mainnet chainconfig (#31733)
This PR applies the config overrides to the new config as well, otherwise they will not be applied to defined configs, making shadowforks impossible. To test: ``` > ./build/bin/geth --override.prague 123 --dev --datadir /tmp/geth INFO [04-28|21:20:47.009] - Prague: @123 > ./build/bin/geth --override.prague 321 --dev --datadir /tmp/geth INFO [04-28|21:23:59.760] - Prague: @321 ``
This commit is contained in:
parent
c8c8d6c403
commit
a511553e44
1 changed files with 3 additions and 0 deletions
|
|
@ -365,6 +365,9 @@ func SetupGenesisBlockWithOverride(db ethdb.Database, triedb *triedb.Database, g
|
|||
return nil, common.Hash{}, nil, errors.New("missing head header")
|
||||
}
|
||||
newCfg := genesis.chainConfigOrDefault(ghash, storedCfg)
|
||||
if err := overrides.apply(newCfg); err != nil {
|
||||
return nil, common.Hash{}, nil, err
|
||||
}
|
||||
|
||||
// Sanity-check the new configuration.
|
||||
if err := newCfg.CheckConfigForkOrder(); err != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue