fix bug unvote for candidate owner

This commit is contained in:
Nguyen Sy Thanh Son 2018-08-10 11:29:29 +00:00
parent 1caf4a5201
commit 54e3e3e1ae
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