diff options
author | Wei-Ning Huang <w@dexon.org> | 2018-11-02 12:43:39 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2018-12-19 20:54:27 +0800 |
commit | 3197e1ec1dcf0c79c130c335c25f2d751e129de6 (patch) | |
tree | e4b6dca2577edbbd19150990c5acc13a982d1c13 /core/vm | |
parent | e6c828724c63cd97879c14436ffcd2824ace211a (diff) | |
download | dexon-3197e1ec1dcf0c79c130c335c25f2d751e129de6.tar dexon-3197e1ec1dcf0c79c130c335c25f2d751e129de6.tar.gz dexon-3197e1ec1dcf0c79c130c335c25f2d751e129de6.tar.bz2 dexon-3197e1ec1dcf0c79c130c335c25f2d751e129de6.tar.lz dexon-3197e1ec1dcf0c79c130c335c25f2d751e129de6.tar.xz dexon-3197e1ec1dcf0c79c130c335c25f2d751e129de6.tar.zst dexon-3197e1ec1dcf0c79c130c335c25f2d751e129de6.zip |
core: vm: governance: remove maxInterval
Diffstat (limited to 'core/vm')
-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(); |