diff --git a/src/CSAccounting.sol b/src/CSAccounting.sol index 6a055268..1ad606e2 100644 --- a/src/CSAccounting.sol +++ b/src/CSAccounting.sol @@ -384,9 +384,9 @@ contract CSAccounting is uint256 lockedAmount = CSBondLock.getActualLockedBond(nodeOperatorId); if (lockedAmount > 0) { CSBondCore._burn(nodeOperatorId, lockedAmount); + // reduce all locked bond even if bond isn't covered lock fully + CSBondLock._remove(nodeOperatorId); } - // reduce all locked bond even if bond isn't covered lock fully - CSBondLock._remove(nodeOperatorId); } /// @notice Penalize bond by burning stETH shares of the given Node Operator diff --git a/test/CSModule.t.sol b/test/CSModule.t.sol index 3e63a16e..dc382bf5 100644 --- a/test/CSModule.t.sol +++ b/test/CSModule.t.sol @@ -5780,9 +5780,7 @@ contract CsmSettleELRewardsStealingPenaltyAdvanced is CSMCommon { ); csm.settleELRewardsStealingPenalty(idsToSettle); - CSBondLock.BondLock memory lock = accounting.getLockedBondInfo(noId); - assertEq(lock.amount, 0 ether); - assertEq(lock.retentionUntil, 0); + assertEq(accounting.getActualLockedBond(noId), 0); } function test_settleELRewardsStealingPenalty_multipleNOs_oneExpired() @@ -5818,15 +5816,13 @@ contract CsmSettleELRewardsStealingPenaltyAdvanced is CSMCommon { ); csm.settleELRewardsStealingPenalty(idsToSettle); + assertEq(accounting.getActualLockedBond(firstNoId), 0); + CSBondLock.BondLock memory lock = accounting.getLockedBondInfo( - firstNoId + secondNoId ); assertEq(lock.amount, 0 ether); assertEq(lock.retentionUntil, 0); - - lock = accounting.getLockedBondInfo(secondNoId); - assertEq(lock.amount, 0 ether); - assertEq(lock.retentionUntil, 0); } function test_settleELRewardsStealingPenalty_CurveReset_NoNewUnbonded()