Skip to content

Commit a511553

Browse files
core: apply overrides to mainnet chainconfig (ethereum#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 ``
1 parent c8c8d6c commit a511553

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core/genesis.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,9 @@ func SetupGenesisBlockWithOverride(db ethdb.Database, triedb *triedb.Database, g
365365
return nil, common.Hash{}, nil, errors.New("missing head header")
366366
}
367367
newCfg := genesis.chainConfigOrDefault(ghash, storedCfg)
368+
if err := overrides.apply(newCfg); err != nil {
369+
return nil, common.Hash{}, nil, err
370+
}
368371

369372
// Sanity-check the new configuration.
370373
if err := newCfg.CheckConfigForkOrder(); err != nil {

0 commit comments

Comments
 (0)