diff options
author | Wei-Ning Huang <w@dexon.org> | 2018-11-02 12:43:39 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 13:49:56 +0800 |
commit | 17ae9e5cceb19244af99d55dcde174778d03d07c (patch) | |
tree | 5850b14067ac9680fc926f4c11e2ce543f41f8a3 /core | |
parent | 6bafc3633ae7c0147cfda1138a6e95f136ae2520 (diff) | |
download | dexon-17ae9e5cceb19244af99d55dcde174778d03d07c.tar dexon-17ae9e5cceb19244af99d55dcde174778d03d07c.tar.gz dexon-17ae9e5cceb19244af99d55dcde174778d03d07c.tar.bz2 dexon-17ae9e5cceb19244af99d55dcde174778d03d07c.tar.lz dexon-17ae9e5cceb19244af99d55dcde174778d03d07c.tar.xz dexon-17ae9e5cceb19244af99d55dcde174778d03d07c.tar.zst dexon-17ae9e5cceb19244af99d55dcde174778d03d07c.zip |
core: vm: governance: remove maxInterval
Diffstat (limited to 'core')
-rw-r--r-- | core/vm/governance.go | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/core/vm/governance.go b/core/vm/governance.go index e2948c25b..f940efd14 100644 --- a/core/vm/governance.go +++ b/core/vm/governance.go @@ -364,20 +364,6 @@ const abiJSON = ` }, { "constant": true, - "inputs": [], - "name": "maxBlockInterval", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, "inputs": [ { "name": "", @@ -478,10 +464,6 @@ const abiJSON = ` { "name": "MinBlockInterval", "type": "uint256" - }, - { - "name": "MaxBlockInterval", - "type": "uint256" } ], "name": "updateConfiguration", @@ -844,12 +826,6 @@ func RunGovernanceContract(evm *EVM, input []byte, contract *Contract) ( return nil, errExecutionReverted } return res, nil - case "maxBlockInterval": - res, err := method.Outputs.Pack(g.state.MaxBlockInterval()) - if err != nil { - return nil, errExecutionReverted - } - return res, nil case "minBlockInterval": res, err := method.Outputs.Pack(g.state.MinBlockInterval()) if err != nil { @@ -943,7 +919,6 @@ const ( dkgSetSizeLoc roundIntervalLoc minBlockIntervalLoc - maxBlockIntervalLoc ) // State manipulation helper fro the governance contract. @@ -1322,11 +1297,6 @@ func (s *GovernanceStateHelper) MinBlockInterval() *big.Int { return s.getStateBigInt(big.NewInt(minBlockIntervalLoc)) } -// uint256 public maxBlockInterval; -func (s *GovernanceStateHelper) MaxBlockInterval() *big.Int { - return s.getStateBigInt(big.NewInt(maxBlockIntervalLoc)) -} - // Stake is a helper function for creating genesis state. func (s *GovernanceStateHelper) Stake(addr common.Address, publicKey []byte, staked *big.Int) { offset := s.NodesLength() @@ -1352,7 +1322,6 @@ func (s *GovernanceStateHelper) Configuration() *params.DexconConfig { DKGSetSize: uint32(s.getStateBigInt(big.NewInt(dkgSetSizeLoc)).Uint64()), RoundInterval: s.getStateBigInt(big.NewInt(roundIntervalLoc)).Uint64(), MinBlockInterval: s.getStateBigInt(big.NewInt(minBlockIntervalLoc)).Uint64(), - MaxBlockInterval: s.getStateBigInt(big.NewInt(maxBlockIntervalLoc)).Uint64(), } } @@ -1369,7 +1338,6 @@ func (s *GovernanceStateHelper) UpdateConfiguration(cfg *params.DexconConfig) { s.setStateBigInt(big.NewInt(dkgSetSizeLoc), big.NewInt(int64(cfg.DKGSetSize))) s.setStateBigInt(big.NewInt(roundIntervalLoc), big.NewInt(int64(cfg.RoundInterval))) s.setStateBigInt(big.NewInt(minBlockIntervalLoc), big.NewInt(int64(cfg.MinBlockInterval))) - s.setStateBigInt(big.NewInt(maxBlockIntervalLoc), big.NewInt(int64(cfg.MaxBlockInterval))) } // event ConfigurationChanged(); |