Skip to content

Commit

Permalink
fix: total strategy shares method naming
Browse files Browse the repository at this point in the history
  • Loading branch information
ypatil12 committed Dec 5, 2023
1 parent 06f635c commit 396c9bb
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/test/integration/IntegrationBase.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -285,10 +285,10 @@ abstract contract IntegrationBase is IntegrationDeployer {
uint[] memory removedShares,
string memory err
) internal {
uint[] memory curShares = _getStrategyShares(strategies);
uint[] memory curShares = _getTotalStrategyShares(strategies);

// Use timewarp to get previous strategy shares
uint[] memory prevShares = _getPrevStrategyShares(strategies);
uint[] memory prevShares = _getPrevTotalStrategyShares(strategies);

for (uint i = 0; i < strategies.length; i++) {
// Ignore BeaconChainETH strategy since it doesn't keep track of global strategy shares
Expand All @@ -306,10 +306,10 @@ abstract contract IntegrationBase is IntegrationDeployer {
IStrategy[] memory strategies,
string memory err
) internal {
uint[] memory curShares = _getStrategyShares(strategies);
uint[] memory curShares = _getTotalStrategyShares(strategies);

// Use timewarp to get previous strategy shares
uint[] memory prevShares = _getPrevStrategyShares(strategies);
uint[] memory prevShares = _getPrevTotalStrategyShares(strategies);

for (uint i = 0; i < strategies.length; i++) {
uint prevShare = prevShares[i];
Expand Down Expand Up @@ -596,11 +596,11 @@ abstract contract IntegrationBase is IntegrationDeployer {
return balances;
}

function _getPrevStrategyShares(IStrategy[] memory strategies) internal timewarp() returns (uint[] memory) {
return _getStrategyShares(strategies);
function _getPrevTotalStrategyShares(IStrategy[] memory strategies) internal timewarp() returns (uint[] memory) {
return _getTotalStrategyShares(strategies);
}

function _getStrategyShares(IStrategy[] memory strategies) internal view returns (uint[] memory) {
function _getTotalStrategyShares(IStrategy[] memory strategies) internal view returns (uint[] memory) {
uint[] memory shares = new uint[](strategies.length);

for (uint i = 0; i < strategies.length; i++) {
Expand Down

0 comments on commit 396c9bb

Please sign in to comment.