Skip to content

Commit

Permalink
TOB-GARDEN-7 resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
r4reetik committed Mar 13, 2024
1 parent 16eb2a9 commit 43e8eb4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions contracts/stake/DelegateManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ abstract contract DelegateManager is BaseStaker {
* @return voteCount The total number of votes delegated to the specified filler address.
*/
function getVotes(address filler) external view returns (uint256 voteCount) {
_checkRole(FILLER, filler);

bytes32[] memory delegates = fillers[filler].delegateStakeIDs._inner._values;
uint256 delegateLength = delegates.length;

Expand Down
4 changes: 3 additions & 1 deletion contracts/stake/FillerManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ abstract contract FillerManager is BaseStaker {
require(filler.deregisteredAt != 0, "FillerManager: not registered");
require(filler.deregisteredAt + FILLER_COOL_DOWN < block.number, "FillerManager: cooldown not passed");

delete (fillers[filler_]);
fillers[filler_].feeInBips = 0;
fillers[filler_].stake = 0;
fillers[filler_].deregisteredAt = 0;

SEED.safeTransfer(filler_, FILLER_STAKE);

Expand Down

0 comments on commit 43e8eb4

Please sign in to comment.