Skip to content

Commit

Permalink
core: fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
buddh0 committed Dec 18, 2023
1 parent bf3535f commit 849d5a2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
9 changes: 4 additions & 5 deletions core/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -437,14 +437,13 @@ func LoadChainConfig(db ethdb.Database, genesis *Genesis) (*params.ChainConfig,

func (g *Genesis) configOrDefault(ghash common.Hash) *params.ChainConfig {
conf := params.GetBuiltInChainConfig(ghash)
switch {
case conf != nil:
if conf != nil {
return conf
case g != nil:
}
if g != nil {
return g.Config // it could be a custom config for QA test, just return
default:
return params.AllEthashProtocolChanges
}
return params.AllEthashProtocolChanges
}

// ToBlock returns the genesis block according to genesis specification.
Expand Down
10 changes: 5 additions & 5 deletions params/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -419,14 +419,14 @@ var (
)

func GetBuiltInChainConfig(ghash common.Hash) *ChainConfig {
switch {
case ghash == MainnetGenesisHash:
switch ghash {
case MainnetGenesisHash:
return MainnetChainConfig
case ghash == BSCGenesisHash:
case BSCGenesisHash:
return BSCChainConfig
case ghash == ChapelGenesisHash:
case ChapelGenesisHash:
return ChapelChainConfig
case ghash == RialtoGenesisHash:
case RialtoGenesisHash:
return RialtoChainConfig
default:
return nil
Expand Down

0 comments on commit 849d5a2

Please sign in to comment.