mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
fix bug unvote for candidate owner
This commit is contained in:
parent
1caf4a5201
commit
54e3e3e1ae
2 changed files with 4 additions and 1 deletions
|
|
@ -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
Loading…
Reference in a new issue