Skip to content

Commit

Permalink
Soloseng/epoch-rewards-L2-test (#11270)
Browse files Browse the repository at this point in the history
* initial tests

* fixed EpochRewardsTest_getRewardsMultiplier_L2 tests

* using whenL2 utils contract

* removed duplicated test

* fixed rest of failing tests

* renamed function
  • Loading branch information
soloseng authored Nov 20, 2024
1 parent 1c68abf commit c71a412
Show file tree
Hide file tree
Showing 2 changed files with 159 additions and 93 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ contract MockEpochManager is IEpochManager {
uint256 private currentEpochNumber;
address[] public electedAccounts;
address[] public electedSigners;
uint256 numberOfElectedAccounts;
address public epochManagerEnabler;
bool systemInitialized;

Expand Down Expand Up @@ -95,6 +96,10 @@ contract MockEpochManager is IEpochManager {
isProcessingEpoch = _isProcessing;
}

function setNumberOfElectedInCurrentSet(uint256 value) external {
numberOfElectedAccounts = value;
}

function getCurrentEpoch() external view returns (uint256, uint256, uint256, uint256) {
return getEpochByNumber(currentEpochNumber);
}
Expand All @@ -104,7 +109,7 @@ contract MockEpochManager is IEpochManager {
}

function numberOfElectedInCurrentSet() external view returns (uint256) {
return electedAccounts.length;
return numberOfElectedAccounts;
}

function getElectedAccounts() external view returns (address[] memory) {
Expand Down
Loading

0 comments on commit c71a412

Please sign in to comment.