aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2016-07-14 16:22:58 +0800
committerPéter Szilágyi <peterke@gmail.com>2016-07-15 21:52:55 +0800
commit2c2e389b778b490fcaf14d9cc45a750647ca5c68 (patch)
tree0534f50f26ce5f62b1acaf0c18667b6cc0998103 /cmd
parent3291235711082759cd7b70253c02150a80d57011 (diff)
downloaddexon-2c2e389b778b490fcaf14d9cc45a750647ca5c68.tar
dexon-2c2e389b778b490fcaf14d9cc45a750647ca5c68.tar.gz
dexon-2c2e389b778b490fcaf14d9cc45a750647ca5c68.tar.bz2
dexon-2c2e389b778b490fcaf14d9cc45a750647ca5c68.tar.lz
dexon-2c2e389b778b490fcaf14d9cc45a750647ca5c68.tar.xz
dexon-2c2e389b778b490fcaf14d9cc45a750647ca5c68.tar.zst
dexon-2c2e389b778b490fcaf14d9cc45a750647ca5c68.zip
cmd, core, eth, miner, params, tests: finalize the DAO fork
Diffstat (limited to 'cmd')
-rw-r--r--cmd/geth/dao_test.go6
-rw-r--r--cmd/utils/flags.go9
2 files changed, 8 insertions, 7 deletions
diff --git a/cmd/geth/dao_test.go b/cmd/geth/dao_test.go
index bfa0c2a03..7058fb385 100644
--- a/cmd/geth/dao_test.go
+++ b/cmd/geth/dao_test.go
@@ -83,7 +83,7 @@ var daoGenesisForkBlock = big.NewInt(314)
// Tests that the DAO hard-fork number and the nodes support/opposition is correctly
// set in the database after various initialization procedures and invocations.
func TestDAODefaultMainnet(t *testing.T) {
- testDAOForkBlockNewChain(t, false, "", [][2]bool{{false, false}}, params.MainNetDAOForkBlock, false)
+ testDAOForkBlockNewChain(t, false, "", [][2]bool{{false, false}}, params.MainNetDAOForkBlock, true)
}
func TestDAOSupportMainnet(t *testing.T) {
testDAOForkBlockNewChain(t, false, "", [][2]bool{{true, false}}, params.MainNetDAOForkBlock, true)
@@ -98,7 +98,7 @@ func TestDAOSwitchToOpposeMainnet(t *testing.T) {
testDAOForkBlockNewChain(t, false, "", [][2]bool{{true, false}, {false, true}}, params.MainNetDAOForkBlock, false)
}
func TestDAODefaultTestnet(t *testing.T) {
- testDAOForkBlockNewChain(t, true, "", [][2]bool{{false, false}}, params.TestNetDAOForkBlock, false)
+ testDAOForkBlockNewChain(t, true, "", [][2]bool{{false, false}}, params.TestNetDAOForkBlock, true)
}
func TestDAOSupportTestnet(t *testing.T) {
testDAOForkBlockNewChain(t, true, "", [][2]bool{{true, false}}, params.TestNetDAOForkBlock, true)
@@ -116,7 +116,7 @@ func TestDAOInitOldPrivnet(t *testing.T) {
testDAOForkBlockNewChain(t, false, daoOldGenesis, [][2]bool{}, nil, false)
}
func TestDAODefaultOldPrivnet(t *testing.T) {
- testDAOForkBlockNewChain(t, false, daoOldGenesis, [][2]bool{{false, false}}, params.MainNetDAOForkBlock, false)
+ testDAOForkBlockNewChain(t, false, daoOldGenesis, [][2]bool{{false, false}}, params.MainNetDAOForkBlock, true)
}
func TestDAOSupportOldPrivnet(t *testing.T) {
testDAOForkBlockNewChain(t, false, daoOldGenesis, [][2]bool{{true, false}}, params.MainNetDAOForkBlock, true)
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index fae1647b3..7b5915a05 100644
--- a/cmd/utils/flags.go
+++ b/cmd/utils/flags.go
@@ -814,17 +814,18 @@ func MustMakeChainConfigFromDb(ctx *cli.Context, db ethdb.Database) *core.ChainC
// Set any missing fields due to them being unset or system upgrade
if config.HomesteadBlock == nil {
if ctx.GlobalBool(TestNetFlag.Name) {
- config.HomesteadBlock = new(big.Int).Set(params.TestNetHomesteadBlock)
+ config.HomesteadBlock = params.TestNetHomesteadBlock
} else {
- config.HomesteadBlock = new(big.Int).Set(params.MainNetHomesteadBlock)
+ config.HomesteadBlock = params.MainNetHomesteadBlock
}
}
if config.DAOForkBlock == nil {
if ctx.GlobalBool(TestNetFlag.Name) {
- config.DAOForkBlock = new(big.Int).Set(params.TestNetDAOForkBlock)
+ config.DAOForkBlock = params.TestNetDAOForkBlock
} else {
- config.DAOForkBlock = new(big.Int).Set(params.MainNetDAOForkBlock)
+ config.DAOForkBlock = params.MainNetDAOForkBlock
}
+ config.DAOForkSupport = true
}
// Force override any existing configs if explicitly requested
switch {