diff options
Diffstat (limited to 'core/config.go')
-rw-r--r-- | core/config.go | 7 |
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 } |