Skip to content

Commit

Permalink
fix: Remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
bingen committed May 1, 2024
1 parent d183913 commit b407fe8
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions contracts/src/TroveManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -600,37 +600,6 @@ contract TroveManager is ERC721, LiquityBase, Ownable, ITroveManager {
}
}

function _getTotalsFromLiquidateTrovesSequence_NormalMode(
IActivePool _activePool,
IDefaultPool _defaultPool,
uint256 _price,
uint256 _boldInStabPool,
uint256 _n
) internal returns (LiquidationTotals memory totals) {
LocalVariables_LiquidationSequence memory vars;
LiquidationValues memory singleLiquidation;
ISortedTroves sortedTrovesCached = sortedTroves;

vars.remainingBoldInStabPool = _boldInStabPool;

for (vars.i = 0; vars.i < _n; vars.i++) {
vars.troveId = sortedTrovesCached.getLast();
vars.ICR = getCurrentICR(vars.troveId, _price);

if (vars.ICR < MCR) {
singleLiquidation =
_liquidateNormalMode(_activePool, _defaultPool, vars.troveId, vars.remainingBoldInStabPool);

vars.remainingBoldInStabPool = vars.remainingBoldInStabPool - singleLiquidation.debtToOffset;

// Add liquidation values to their respective running totals
totals = _addLiquidationValuesToTotals(totals, singleLiquidation);
} else {
break;
} // break if the loop reaches a Trove with ICR >= MCR
}
}

/*
* Attempt to liquidate a custom list of troves provided by the caller.
*/
Expand Down

0 comments on commit b407fe8

Please sign in to comment.