core,params: add holesky to default genesis function (#28903)

This commit is contained in:
lightclient 2024-02-07 09:19:14 -07:00 committed by GitHub
parent 1f50aa7631
commit 449d3f0d87
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -413,6 +413,8 @@ func (g *Genesis) configOrDefault(ghash common.Hash) *params.ChainConfig {
return g.Config return g.Config
case ghash == params.MainnetGenesisHash: case ghash == params.MainnetGenesisHash:
return params.MainnetChainConfig return params.MainnetChainConfig
case ghash == params.HoleskyGenesisHash:
return params.HoleskyChainConfig
case ghash == params.SepoliaGenesisHash: case ghash == params.SepoliaGenesisHash:
return params.SepoliaChainConfig return params.SepoliaChainConfig
case ghash == params.GoerliGenesisHash: case ghash == params.GoerliGenesisHash:

View File

@ -642,7 +642,7 @@ func (c *ChainConfig) CheckConfigForkOrder() error {
lastFork.name, cur.name, cur.block) lastFork.name, cur.name, cur.block)
} else { } else {
return fmt.Errorf("unsupported fork ordering: %v not enabled, but %v enabled at timestamp %v", 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 // Fork (whether defined by block or timestamp) must follow the fork definition sequence
@ -652,7 +652,7 @@ func (c *ChainConfig) CheckConfigForkOrder() error {
lastFork.name, lastFork.block, cur.name, cur.block) lastFork.name, lastFork.block, cur.name, cur.block)
} else if lastFork.timestamp != nil && *lastFork.timestamp > *cur.timestamp { } 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", 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 // Timestamp based forks can follow block based ones, but not the other way around