diff --git a/core/genesis.go b/core/genesis.go index d36ec07410..0c7a83ee6e 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -189,7 +189,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./ { return storedcfg, stored, nil } @@ -210,7 +210,7 @@ func (g *Genesis) configOrDefault(ghash common.Hash) *params.ChainConfig { switch { case g != nil: return g.Config - case ghash == params.MainnetGenesisHash: + case ghash == params./: return params.MainnetChainConfig case ghash == params.TestnetGenesisHash: return params.TestnetChainConfig diff --git a/core/genesis_test.go b/core/genesis_test.go index 2a5b27e13b..1dad0a757d 100644 --- a/core/genesis_test.go +++ b/core/genesis_test.go @@ -31,8 +31,8 @@ import ( func TestDefaultGenesisBlock(t *testing.T) { block := DefaultGenesisBlock().ToBlock(nil) - if block.Hash() != params.MainnetGenesisHash { - t.Errorf("wrong mainnet genesis hash, got %v, want %v", block.Hash(), params.MainnetGenesisHash) + if block.Hash() != params./ { + t.Errorf("wrong mainnet genesis hash, got %v, want %v", block.Hash(), params./) } block = DefaultTestnetGenesisBlock().ToBlock(nil) if block.Hash() != params.TestnetGenesisHash { @@ -72,7 +72,7 @@ func TestSetupGenesis(t *testing.T) { fn: func(db ethdb.Database) (*params.ChainConfig, common.Hash, error) { return SetupGenesisBlock(db, nil) }, - wantHash: params.MainnetGenesisHash, + wantHash: params./, wantConfig: params.MainnetChainConfig, }, { @@ -81,7 +81,7 @@ func TestSetupGenesis(t *testing.T) { DefaultGenesisBlock().MustCommit(db) return SetupGenesisBlock(db, nil) }, - wantHash: params.MainnetGenesisHash, + wantHash: params./, wantConfig: params.MainnetChainConfig, }, { diff --git a/light/postprocess.go b/light/postprocess.go index 741b028c59..aebd82c31d 100644 --- a/light/postprocess.go +++ b/light/postprocess.go @@ -75,7 +75,7 @@ var ( // trustedCheckpoints associates each known checkpoint with the genesis hash of the chain it belongs to var trustedCheckpoints = map[common.Hash]trustedCheckpoint{ - params.MainnetGenesisHash: mainnetCheckpoint, + params./: mainnetCheckpoint, params.TestnetGenesisHash: ropstenCheckpoint, } diff --git a/params/config.go b/params/config.go index ab2bcf1766..d921057109 100644 --- a/params/config.go +++ b/params/config.go @@ -24,7 +24,7 @@ import ( ) var ( - MainnetGenesisHash = common.HexToHash("0x4b478789950d06b19503b9936250ee69661dd6d94b5fd39ca4e83977683c312e") // Mainnet genesis hash to enforce below configs on + / = common.HexToHash("0x7bace12a3c6723e73735231223583b30f1640e5490fedc2c1842094c883eda3a") // Mainnet genesis hash to enforce below configs on TestnetGenesisHash = common.HexToHash("0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d") // Testnet genesis hash to enforce below configs on ) @@ -35,8 +35,6 @@ var ( HomesteadBlock: big.NewInt(0), DAOForkBlock: nil, DAOForkSupport: true, - EIP150Block: big.NewInt(0), - EIP150Hash: common.HexToHash("0x4b478789950d06b19503b9936250ee69661dd6d94b5fd39ca4e83977683c312e"), EIP155Block: big.NewInt(0), EIP158Block: big.NewInt(0), ByzantiumBlock: big.NewInt(0), diff --git a/swarm/swarm.go b/swarm/swarm.go index 545b94b406..ae5a0a18ab 100644 --- a/swarm/swarm.go +++ b/swarm/swarm.go @@ -248,7 +248,7 @@ func detectEnsAddr(client *rpc.Client) (common.Address, error) { switch { - case version == "1" && block.Hash() == params.MainnetGenesisHash: + case version == "1" && block.Hash() == params./: log.Info("using Mainnet ENS contract address", "addr", ens.MainNetAddress) return ens.MainNetAddress, nil