diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2016-11-21 05:32:31 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2016-11-23 16:34:01 +0800 |
commit | a8ca75738a45a137ff7b2dfa276398fad26439da (patch) | |
tree | 69c28c8a7b79c7a4412cea8964fbbafe16b4b3cc /cmd/utils/flags.go | |
parent | aad4890082c1624795991d534db9497c8b63630d (diff) | |
download | go-tangerine-a8ca75738a45a137ff7b2dfa276398fad26439da.tar.gz go-tangerine-a8ca75738a45a137ff7b2dfa276398fad26439da.tar.zst go-tangerine-a8ca75738a45a137ff7b2dfa276398fad26439da.zip |
core: implemented new ropsten testnet
Diffstat (limited to 'cmd/utils/flags.go')
-rw-r--r-- | cmd/utils/flags.go | 32 |
1 files changed, 9 insertions, 23 deletions
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index fcdd08737..fc7685b77 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -750,9 +750,9 @@ func RegisterEthService(ctx *cli.Context, stack *node.Node, extra []byte) { case ctx.GlobalBool(TestNetFlag.Name): if !ctx.GlobalIsSet(NetworkIdFlag.Name) { - ethConf.NetworkId = 2 + ethConf.NetworkId = 3 } - ethConf.Genesis = core.TestNetGenesisBlock() + ethConf.Genesis = core.DefaultTestnetGenesisBlock() case ctx.GlobalBool(DevModeFlag.Name): ethConf.Genesis = core.OlympicGenesisBlock() @@ -845,34 +845,20 @@ func MakeChainConfigFromDb(ctx *cli.Context, db ethdb.Database) *params.ChainCon (genesis.Hash() == params.TestNetGenesisHash && ctx.GlobalBool(TestNetFlag.Name)) if defaults { - // Homestead fork if ctx.GlobalBool(TestNetFlag.Name) { - config.HomesteadBlock = params.TestNetHomesteadBlock + config = params.TestnetChainConfig } else { + // Homestead fork config.HomesteadBlock = params.MainNetHomesteadBlock - } - // DAO fork - if ctx.GlobalBool(TestNetFlag.Name) { - config.DAOForkBlock = params.TestNetDAOForkBlock - } else { + // DAO fork config.DAOForkBlock = params.MainNetDAOForkBlock - } - config.DAOForkSupport = true + config.DAOForkSupport = true - // DoS reprice fork - if ctx.GlobalBool(TestNetFlag.Name) { - config.EIP150Block = params.TestNetHomesteadGasRepriceBlock - config.EIP150Hash = params.TestNetHomesteadGasRepriceHash - } else { + // DoS reprice fork config.EIP150Block = params.MainNetHomesteadGasRepriceBlock config.EIP150Hash = params.MainNetHomesteadGasRepriceHash - } - // DoS state cleanup fork - if ctx.GlobalBool(TestNetFlag.Name) { - config.EIP155Block = params.TestNetSpuriousDragon - config.EIP158Block = params.TestNetSpuriousDragon - config.ChainId = params.TestNetChainID - } else { + + // DoS state cleanup fork config.EIP155Block = params.MainNetSpuriousDragon config.EIP158Block = params.MainNetSpuriousDragon config.ChainId = params.MainNetChainID |