@@ -7491,8 +7491,8 @@ contract DelegationManagerUnitTests_slashingShares is DelegationManagerUnitTests
74917491 delegationManager.queueWithdrawals (queuedWithdrawalParams);
74927492 assertEq (
74937493 delegationManager.getSlashableSharesInQueue (operator, beaconChainETHStrategy),
7494- 0 ,
7495- "there should be 0 withdrawAmount slashable shares in queue since this is beaconChainETHStrategy "
7494+ withdrawAmount ,
7495+ "there should be withdrawAmount slashable shares in queue "
74967496 );
74977497 }
74987498
@@ -7504,6 +7504,7 @@ contract DelegationManagerUnitTests_slashingShares is DelegationManagerUnitTests
75047504 // Therefore amount of shares to burn should be what the staker still has remaining + staker1 shares and then
75057505 // divided by 2 since the operator was slashed 50%
75067506 uint256 sharesToDecrease = (shares + depositAmount - withdrawAmount) * 3 / 4 ;
7507+ uint256 sharesToBurn = sharesToDecrease + (delegationManager.getSlashableSharesInQueue (operator, beaconChainETHStrategy) * 3 / 4 );
75077508
75087509 // 4. Burn shares
75097510 _setOperatorMagnitude (operator, beaconChainETHStrategy, newMagnitude);
@@ -7512,7 +7513,7 @@ contract DelegationManagerUnitTests_slashingShares is DelegationManagerUnitTests
75127513
75137514 // Assert OperatorSharesSlashed event was emitted with correct params
75147515 cheats.expectEmit (true , true , true , true , address (delegationManager));
7515- emit OperatorSharesSlashed (operator, beaconChainETHStrategy, sharesToDecrease );
7516+ emit OperatorSharesSlashed (operator, beaconChainETHStrategy, sharesToBurn );
75167517
75177518 cheats.prank (address (allocationManagerMock));
75187519 delegationManager.slashOperatorShares ({
@@ -7525,8 +7526,8 @@ contract DelegationManagerUnitTests_slashingShares is DelegationManagerUnitTests
75257526 // 5. Assert expected values
75267527 uint256 queuedSlashableSharesAfter = delegationManager.getSlashableSharesInQueue (operator, beaconChainETHStrategy);
75277528 uint256 operatorSharesAfter = delegationManager.operatorShares (operator, beaconChainETHStrategy);
7528- assertEq (queuedSlashableSharesBefore, 0 , "Slashable shares in queue should be 0 for beaconChainStrategy " );
7529- assertEq (queuedSlashableSharesAfter, 0 , "Slashable shares in queue should be 0 for beaconChainStrategy " );
7529+ assertEq (queuedSlashableSharesBefore, withdrawAmount , "Slashable shares in queue should be full withdraw amount " );
7530+ assertEq (queuedSlashableSharesAfter, withdrawAmount / 4 , "Slashable shares in queue should be 1/4 withdraw amount after slashing " );
75307531 assertEq (operatorSharesAfter, operatorSharesBefore - sharesToDecrease, "operator shares should be decreased by sharesToDecrease " );
75317532 }
75327533
0 commit comments