diff --git a/src/CSModule.sol b/src/CSModule.sol index 541211a2..a684db5d 100644 --- a/src/CSModule.sol +++ b/src/CSModule.sol @@ -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; diff --git a/test/CSModule.t.sol b/test/CSModule.t.sol index 73d6d093..5e905214 100644 --- a/test/CSModule.t.sol +++ b/test/CSModule.t.sol @@ -1,4 +1,5 @@ -// SPDX-License-Identifier: UNLICENSED +// SPDX-FileCopyrightText: 2023 Lido +// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.21; import "forge-std/Test.sol"; @@ -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() @@ -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, ""); diff --git a/test/ValidatorCountsReport.t.sol b/test/ValidatorCountsReport.t.sol index 958929eb..0801f27a 100644 --- a/test/ValidatorCountsReport.t.sol +++ b/test/ValidatorCountsReport.t.sol @@ -1,4 +1,5 @@ -// SPDX-License-Identifier: UNLICENSED +// SPDX-FileCopyrightText: 2023 Lido +// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; import "forge-std/Test.sol";