Skip to content

Commit

Permalink
core: allow for config override on non-mainnet networks
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusVanDerWijden committed Mar 14, 2022
1 parent 0449ff5 commit 3abd590
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/genesis.go
Expand Up @@ -207,9 +207,6 @@ func SetupGenesisBlockWithOverride(db ethdb.Database, genesis *Genesis, override
if overrideArrowGlacier != nil {
newcfg.ArrowGlacierBlock = overrideArrowGlacier
}
if overrideTerminalTotalDifficulty != nil {
newcfg.TerminalTotalDifficulty = overrideTerminalTotalDifficulty
}
if err := newcfg.CheckConfigForkOrder(); err != nil {
return newcfg, common.Hash{}, err
}
Expand All @@ -219,6 +216,10 @@ func SetupGenesisBlockWithOverride(db ethdb.Database, genesis *Genesis, override
rawdb.WriteChainConfig(db, stored, newcfg)
return newcfg, stored, nil
}

if overrideTerminalTotalDifficulty != nil {
storedcfg.TerminalTotalDifficulty = overrideTerminalTotalDifficulty
}
// Special case: don't change the existing config of a non-mainnet chain if no new
// config is supplied. These chains would get AllProtocolChanges (and a compat error)
// if we just continued here.
Expand Down

0 comments on commit 3abd590

Please sign in to comment.