Skip to content

Commit

Permalink
fix: bug in calculation of the next id in getDebtPerInterestRateAscen…
Browse files Browse the repository at this point in the history
…ding
  • Loading branch information
EmperorOrokuSaki authored Jan 30, 2025
1 parent d3ec4d5 commit a955da0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/src/MultiTroveGetter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ contract MultiTroveGetter is IMultiTroveGetter {
assert(address(sortedTroves) != address(0));

data = new DebtPerInterestRate[](_maxIterations);
currId = sortedTroves.getPrev(_startId);
currId = _startId == 0 ? sortedTroves.getPrev(_startId) : _startId;

for (uint256 i = 0; i < _maxIterations; ++i) {
if (currId == 0) break;
Expand Down

0 comments on commit a955da0

Please sign in to comment.