Skip to content

Commit

Permalink
core,params: add holesky to default genesis function (ethereum#28903)
Browse files Browse the repository at this point in the history
  • Loading branch information
lightclient authored Feb 7, 2024
1 parent 1f50aa7 commit 449d3f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions core/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,8 @@ func (g *Genesis) configOrDefault(ghash common.Hash) *params.ChainConfig {
return g.Config
case ghash == params.MainnetGenesisHash:
return params.MainnetChainConfig
case ghash == params.HoleskyGenesisHash:
return params.HoleskyChainConfig
case ghash == params.SepoliaGenesisHash:
return params.SepoliaChainConfig
case ghash == params.GoerliGenesisHash:
Expand Down
4 changes: 2 additions & 2 deletions params/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ func (c *ChainConfig) CheckConfigForkOrder() error {
lastFork.name, cur.name, cur.block)
} else {
return fmt.Errorf("unsupported fork ordering: %v not enabled, but %v enabled at timestamp %v",
lastFork.name, cur.name, cur.timestamp)
lastFork.name, cur.name, *cur.timestamp)
}

// Fork (whether defined by block or timestamp) must follow the fork definition sequence
Expand All @@ -652,7 +652,7 @@ func (c *ChainConfig) CheckConfigForkOrder() error {
lastFork.name, lastFork.block, cur.name, cur.block)
} else if lastFork.timestamp != nil && *lastFork.timestamp > *cur.timestamp {
return fmt.Errorf("unsupported fork ordering: %v enabled at timestamp %v, but %v enabled at timestamp %v",
lastFork.name, lastFork.timestamp, cur.name, cur.timestamp)
lastFork.name, *lastFork.timestamp, cur.name, *cur.timestamp)
}

// Timestamp based forks can follow block based ones, but not the other way around
Expand Down

0 comments on commit 449d3f0

Please sign in to comment.