Skip to content

Commit 014e074

Browse files
committed
fix: tests
1 parent 5d5aaa1 commit 014e074

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

cache/test-failures

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
testFuzz_avsSlash_bcSlash_checkpoint|testFuzz_avsSlash_bcSlash_checkpoint_balanceIncrease|testFuzz_avsSlash_bcSlash_checkpoint_verifyValidator|testFuzz_bcSlash_checkpoint_avsSlash|testFuzz_slashFullyBC_revert_deposit
1+
testFuzz_slashFullyBC_revert_deposit

src/test/integration/IntegrationBase.t.sol

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,7 @@ abstract contract IntegrationBase is IntegrationGetters {
872872
uint prevShares = _getPrevWithdrawableShares(staker, allocateParams.strategies)[0];
873873
uint depositShares = _getStakerDepositShares(staker, allocateParams.strategies)[0];
874874
// 1. The withdrawable shares should decrease by a factor of the BCSF
875-
assertEq(prevShares.mulWad(_getBeaconChainSlashingFactor(staker)), curShares, err);
875+
assertApproxEqAbs(prevShares.mulWad(_getBeaconChainSlashingFactor(staker)), curShares, 1e2, err);
876876
/**
877877
* 2. The delta in shares is given by:
878878
* (depositShares * operatorMag) - (depositShares * operatorMag * BCSF)
@@ -883,7 +883,8 @@ abstract contract IntegrationBase is IntegrationGetters {
883883
uint originalAVSSlashedShares = depositShares.mulWadRoundUp(allocateParams.newMagnitudes[0].mulWadRoundUp(wadToSlash));
884884
uint withdrawableSharesAfterAVSSlash = depositShares - originalAVSSlashedShares;
885885
uint expectedDelta = withdrawableSharesAfterAVSSlash.mulWad(WAD - beaconChainSlashingFactor);
886-
assertEq(prevShares - expectedDelta, curShares, err);
886+
assertApproxEqAbs(prevShares - expectedDelta, curShares, 1e2, err);
887+
887888
/**
888889
* 3. The attributable avs slashed shares should decrease by a factor of the BCSF
889890
* Attributable avs slashed shares = originalWithdrawableShares - bcSlashedShares - curShares

0 commit comments

Comments
 (0)