Skip to content

Commit

Permalink
Merge pull request #174 from mdehoog/michael/fix-superchain-panic
Browse files Browse the repository at this point in the history
Fix potential nil pointer dereference panic in superchain overrides
  • Loading branch information
protolambda authored Oct 27, 2023
2 parents e417358 + ac6f77b commit 237170b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ func SetupGenesisBlockWithOverride(db ethdb.Database, triedb *trie.Database, gen
if config != nil {
// If applying the superchain-registry to a known OP-Stack chain,
// then override the local chain-config with that from the registry.
if overrides != nil && overrides.ApplySuperchainUpgrades && config.IsOptimism() && config.ChainID != nil && genesis.Config.ChainID.IsUint64() {
if overrides != nil && overrides.ApplySuperchainUpgrades && config.IsOptimism() && config.ChainID != nil && config.ChainID.IsUint64() {
if _, ok := superchain.OPChains[config.ChainID.Uint64()]; ok {
conf, err := params.LoadOPStackChainConfig(config.ChainID.Uint64())
if err != nil {
Expand Down

0 comments on commit 237170b

Please sign in to comment.