cmd, core, eth, params: implement flags to control dao fork blocks

This commit is contained in:
Péter Szilágyi
2016-07-07 16:04:34 +03:00
parent aa1e052cb4
commit 6060e098c9
7 changed files with 354 additions and 46 deletions

View File

@ -31,7 +31,8 @@ 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 (0 = already homestead)
DAOForkBlock *big.Int `json:"daoForkBlock"` // TheDAO hard-fork block (nil = no fork)
VmConfig vm.Config `json:"-"`
}
@ -41,6 +42,5 @@ func (c *ChainConfig) IsHomestead(num *big.Int) bool {
if num == nil {
return false
}
return num.Cmp(c.HomesteadBlock) >= 0
}