Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Existing tests fix #605

Merged
merged 6 commits into from
Feb 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 0 additions & 37 deletions contracts/0.4.24/test_helpers/LidoMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -70,41 +70,4 @@ contract LidoMock is Lido {
function burnShares(address _account, uint256 _amount) external {
_burnShares(_account, _amount);
}

function handleOracleReportDirect(
// Oracle timings
uint256 _reportTimestamp,
uint256 _timeElapsed,
// CL values
uint256 _clValidators,
uint256 _clBalance,
// EL values
uint256 _withdrawalVaultBalance,
uint256 _elRewardsVaultBalance,
// Decision about withdrawals processing
uint256 _lastFinalizableRequestId,
uint256 _simulatedShareRate
) external returns (
uint256 totalPooledEther,
uint256 totalShares,
uint256 withdrawals,
uint256 elRewards
) {

OracleReportContracts memory protocolContracts = _loadOracleReportContracts();

return _handleOracleReport(
OracleReportedData(
_reportTimestamp,
_timeElapsed,
_clValidators,
_clBalance,
_withdrawalVaultBalance,
_elRewardsVaultBalance,
_lastFinalizableRequestId,
_simulatedShareRate
),
protocolContracts
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ contract OracleReportSanityChecker is AccessControlEnumerable {

uint256 churnLimit = (_limitsList.churnValidatorsPerDayLimit * _timeElapsed) / SECONDS_PER_DAY;

if (_appearedValidators > churnLimit) revert IncorrectAppearedValidators(churnLimit);
if (_appearedValidators > churnLimit) revert IncorrectAppearedValidators(_appearedValidators);
}

function _checkRequestIdToFinalizeUpTo(
Expand Down
13 changes: 11 additions & 2 deletions contracts/0.8.9/test_helpers/OracleReportSanityCheckerMocks.sol
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,18 @@ contract LidoLocatorStub is ILidoLocator {
}

contract OracleReportSanityCheckerStub {

error SelectorNotFound(bytes4 sig, uint256 value, bytes data);

fallback() external payable { revert SelectorNotFound(msg.sig, msg.value, msg.data); }

function checkLidoOracleReport(
uint256 _timeElapsed,
uint256 _preCLBalance,
uint256 _postCLBalance,
uint256 _withdrawalVaultBalance
uint256 _withdrawalVaultBalance,
uint256 _preCLValidators,
uint256 _postCLValidators
) external view {}

function checkWithdrawalQueueOracleReport(
Expand All @@ -102,4 +109,6 @@ contract OracleReportSanityCheckerStub {
elRewards = _elRewardsVaultBalance;
sharesToBurnLimit = _etherToLockForWithdrawals;
}
}

function checkAccountingExtraDataListItemsCount(uint256 _extraDataListItemsCount) external view {}
}
Loading