params: remove redundant consts, disable metro on AllProtocolChanges

This commit is contained in:
Péter Szilágyi
2017-07-04 12:28:58 +03:00
parent a0aa071ca6
commit 8f12d76a47
10 changed files with 57 additions and 107 deletions

View File

@ -143,7 +143,7 @@ func SetupGenesisBlock(db ethdb.Database, genesis *Genesis) (*params.ChainConfig
// 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.
if genesis == nil && stored != params.MainNetGenesisHash {
if genesis == nil && stored != params.MainnetGenesisHash {
return storedcfg, stored, nil
}
@ -164,9 +164,9 @@ func (g *Genesis) configOrDefault(ghash common.Hash) *params.ChainConfig {
switch {
case g != nil:
return g.Config
case ghash == params.MainNetGenesisHash:
case ghash == params.MainnetGenesisHash:
return params.MainnetChainConfig
case ghash == params.TestNetGenesisHash:
case ghash == params.TestnetGenesisHash:
return params.TestnetChainConfig
default:
return params.AllProtocolChanges