diff --git a/src/contracts/slasher/VetoSlasher.sol b/src/contracts/slasher/VetoSlasher.sol index 0df66968..c0edcb41 100644 --- a/src/contracts/slasher/VetoSlasher.sol +++ b/src/contracts/slasher/VetoSlasher.sol @@ -217,7 +217,8 @@ contract VetoSlasher is BaseSlasher, AccessControlUpgradeable, IVetoSlasher { SlashRequest storage request = slashRequests[slashIndex]; - uint256 resolverShares_ = resolverShares(request.network, msg.sender, vetoSlashHints.resolverSharesHint); + uint256 resolverShares_ = + resolverSharesAt(request.network, msg.sender, request.captureTimestamp, vetoSlashHints.resolverSharesHint); if (resolverShares_ == 0) { revert NotResolver(); diff --git a/test/slasher/VetoSlasher.t.sol b/test/slasher/VetoSlasher.t.sol index 1b51379d..4d9bf901 100644 --- a/test/slasher/VetoSlasher.t.sol +++ b/test/slasher/VetoSlasher.t.sol @@ -1062,8 +1062,8 @@ contract VetoSlasherTest is Test { (vault, delegator, slasher) = _getVaultAndDelegatorAndSlasher(epochDuration, vetoDuration); - resolverShares1 = bound(resolverShares1, 1, slasher.SHARES_BASE()); - resolverShares2 = bound(resolverShares2, 1, slasher.SHARES_BASE()); + resolverShares1 = bound(resolverShares1, 1, slasher.SHARES_BASE() - 1); + resolverShares2 = bound(resolverShares2, 1, slasher.SHARES_BASE() - 1); // address network = alice; _registerNetwork(alice, alice); @@ -1089,6 +1089,9 @@ contract VetoSlasherTest is Test { blockTimestamp = blockTimestamp + 1; vm.warp(blockTimestamp); + _setResolverShares(alice, alice, resolverShares1 + 1, ""); + _setResolverShares(alice, bob, resolverShares2 + 1, ""); + slashAmount1 = Math.min(slashAmount1, Math.min(depositAmount, Math.min(networkLimit, operatorNetworkLimit1))); _requestSlash(alice, alice, alice, slashAmount1, uint48(blockTimestamp - 1), "");