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:
Marius van der Wijden 2025-04-29 08:29:56 +02:00 committed by GitHub
parent c8c8d6c403
commit a511553e44
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 {