aboutsummaryrefslogtreecommitdiffstats
path: root/core/config.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2016-07-16 18:08:16 +0800
committerGitHub <noreply@github.com>2016-07-16 18:08:16 +0800
commita4c4125b1155d9276614029163b498a17643f0f2 (patch)
tree328c438483cb7c87333190605ec1ef79cfa162a6 /core/config.go
parentaa1e052cb41c39363a9930added46dac5b6db832 (diff)
parent993b41216092fa6dc20d3755afe322cd1376b398 (diff)
downloaddexon-a4c4125b1155d9276614029163b498a17643f0f2.tar
dexon-a4c4125b1155d9276614029163b498a17643f0f2.tar.gz
dexon-a4c4125b1155d9276614029163b498a17643f0f2.tar.bz2
dexon-a4c4125b1155d9276614029163b498a17643f0f2.tar.lz
dexon-a4c4125b1155d9276614029163b498a17643f0f2.tar.xz
dexon-a4c4125b1155d9276614029163b498a17643f0f2.tar.zst
dexon-a4c4125b1155d9276614029163b498a17643f0f2.zip
Merge pull request #2814 from karalabe/dao-hard-finalcombo
cmd, core, eth, miner, params, tests: finalize the DAO fork
Diffstat (limited to 'core/config.go')
-rw-r--r--core/config.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/config.go b/core/config.go
index 81ca76aa3..c0d065a57 100644
--- a/core/config.go
+++ b/core/config.go
@@ -31,16 +31,17 @@ var ChainConfigNotFoundErr = errors.New("ChainConfig not found") // general conf
// that any network, identified by its genesis block, can have its own
// set of configuration options.
type ChainConfig struct {
- HomesteadBlock *big.Int // homestead switch block
+ HomesteadBlock *big.Int `json:"homesteadBlock"` // Homestead switch block (nil = no fork, 0 = already homestead)
+ DAOForkBlock *big.Int `json:"daoForkBlock"` // TheDAO hard-fork switch block (nil = no fork)
+ DAOForkSupport bool `json:"daoForkSupport"` // Whether the nodes supports or opposes the DAO hard-fork
VmConfig vm.Config `json:"-"`
}
// IsHomestead returns whether num is either equal to the homestead block or greater.
func (c *ChainConfig) IsHomestead(num *big.Int) bool {
- if num == nil {
+ if c.HomesteadBlock == nil || num == nil {
return false
}
-
return num.Cmp(c.HomesteadBlock) >= 0
}