mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
Merge pull request #131 from thanhson1085/master
Fix bug unvote in smart contract
This commit is contained in:
commit
6cf6f7b655
2 changed files with 4 additions and 1 deletions
|
|
@ -65,6 +65,9 @@ contract TomoValidator {
|
||||||
|
|
||||||
modifier onlyValidVote (address _candidate, uint256 _cap) {
|
modifier onlyValidVote (address _candidate, uint256 _cap) {
|
||||||
require(validatorsState[_candidate].voters[msg.sender] >= _cap);
|
require(validatorsState[_candidate].voters[msg.sender] >= _cap);
|
||||||
|
if (validatorsState[_candidate].owner == msg.sender) {
|
||||||
|
require(validatorsState[_candidate].voters[msg.sender].sub(_cap) >= minCandidateCap);
|
||||||
|
}
|
||||||
_;
|
_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue