mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
update Tomo Validator smart contract, add getWithdrawCap function
This commit is contained in:
parent
b29f9178b6
commit
3dfe17035a
2 changed files with 32 additions and 2 deletions
|
|
@ -158,6 +158,10 @@ contract TomoValidator {
|
|||
return withdrawsState[msg.sender].blockNumbers;
|
||||
}
|
||||
|
||||
function getWithdrawCap(uint256 _blockNumber) public view returns(uint256) {
|
||||
return withdrawsState[msg.sender].caps[_blockNumber];
|
||||
}
|
||||
|
||||
function unvote(address _candidate, uint256 _cap) public onlyValidVote(_candidate, _cap) {
|
||||
validatorsState[_candidate].cap = validatorsState[_candidate].cap.sub(_cap);
|
||||
validatorsState[_candidate].voters[msg.sender] = validatorsState[_candidate].voters[msg.sender].sub(_cap);
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue