Merge pull request #131 from thanhson1085/master

Fix bug unvote in smart contract
This commit is contained in:
Tuna 2018-08-11 16:35:33 +07:00 committed by GitHub
commit 6cf6f7b655
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -65,6 +65,9 @@ contract TomoValidator {
modifier onlyValidVote (address _candidate, uint256 _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