Skip to content

Commit

Permalink
fix for review
Browse files Browse the repository at this point in the history
  • Loading branch information
skhomuti committed Dec 4, 2023
1 parent d17ecbc commit 6c92415
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/CSModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,7 @@ contract CSModule is IStakingModule, CSModuleBase {
stuckPenaltyEndTimestamp = no.stuckPenaltyEndTimestamp;
totalExitedValidators = no.totalExitedKeys;
totalDepositedValidators = no.totalDepositedKeys;
// TODO: it should be more clear and probably revisited later
depositableValidatorsCount =
no.totalVettedKeys -
totalDepositedValidators;
Expand Down
8 changes: 5 additions & 3 deletions test/CSModule.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
// SPDX-FileCopyrightText: 2023 Lido <info@lido.fi>
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.21;

import "forge-std/Test.sol";
Expand Down Expand Up @@ -1059,7 +1060,8 @@ contract CsmGetNodeOperatorSummary is CSMCommon {
assertTrue(summary.isTargetLimitActive);
assertEq(summary.targetValidatorsCount, 2);
// should be unvetted
assertEq(summary.depositableValidatorsCount, 0);
NodeOperatorInfo memory no = csm.getNodeOperator(noId);
assertEq(no.totalVettedValidators, 0);
}

function test_getNodeOperatorSummary_targetLimitHigherThanVettedKeys()
Expand Down Expand Up @@ -1162,7 +1164,7 @@ contract CsmUpdateTargetValidatorsLimits is CSMCommon {
}

contract CsmUpdateStuckValidatorsCount is CSMCommon {
function test_updateStuckValidatorsCount() public {
function test_updateStuckValidatorsCount_NonZero() public {
uint256 noId = createNodeOperator(3);
csm.vetKeys(noId, 3);
csm.obtainDepositData(1, "");
Expand Down
3 changes: 2 additions & 1 deletion test/ValidatorCountsReport.t.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
// SPDX-FileCopyrightText: 2023 Lido <info@lido.fi>
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.0;

import "forge-std/Test.sol";
Expand Down

0 comments on commit 6c92415

Please sign in to comment.