diff --git a/src/base/Pool.sol b/src/base/Pool.sol index af512fbbd..5444f2aa1 100644 --- a/src/base/Pool.sol +++ b/src/base/Pool.sol @@ -395,7 +395,7 @@ abstract contract Pool is Clone, ReentrancyGuard, Multicall, IPool { * @dev update `reserveAuction.latestBurnEventEpoch` and burn event `timestamp` state * @dev === Reverts on === * @dev 2 weeks not passed `ReserveAuctionTooSoon()` - * @dev unsettled liquidation `AuctionNotCleared()` + * @dev unsettled liquidation `AuctionActive()` * @dev === Emit events === * @dev - `KickReserveAuction` */ diff --git a/src/libraries/helpers/RevertsHelper.sol b/src/libraries/helpers/RevertsHelper.sol index 64642decc..e5e45e5a6 100644 --- a/src/libraries/helpers/RevertsHelper.sol +++ b/src/libraries/helpers/RevertsHelper.sol @@ -18,6 +18,7 @@ import { Maths } from '../internal/Maths.sol'; // See `IPoolErrors` for descriptions error AuctionNotCleared(); + error AuctionActive(); error AmountLTMinDebt(); error DustAmountNotExceeded(); error LimitIndexExceeded(); @@ -97,13 +98,13 @@ import { Maths } from '../internal/Maths.sol'; /** * @notice Check if there are still active / non settled auctions in pool. * @notice Prevents kicking reserves auctions until all pending auctions are fully settled. - * @dev Reverts with `AuctionNotCleared`. + * @dev Reverts with `AuctionActive`. * @param auctions_ Auctions data. */ function _revertIfActiveAuctions( AuctionsState storage auctions_ ) view { - if (auctions_.noOfAuctions != 0) revert AuctionNotCleared(); + if (auctions_.noOfAuctions != 0) revert AuctionActive(); } /** diff --git a/tests/forge/unit/ERC20Pool/ERC20PoolLiquidationsSettle.t.sol b/tests/forge/unit/ERC20Pool/ERC20PoolLiquidationsSettle.t.sol index a18b0c640..f2f03ab8d 100644 --- a/tests/forge/unit/ERC20Pool/ERC20PoolLiquidationsSettle.t.sol +++ b/tests/forge/unit/ERC20Pool/ERC20PoolLiquidationsSettle.t.sol @@ -1153,9 +1153,8 @@ contract ERC20PoolLiquidationsSettleRegressionTest is ERC20HelperContract { assertEq(claimableReserves, 294_613_859.916107852369559136 * 1e18); // test reserves auction cannot be kicked until auction settled - vm.expectRevert(abi.encodeWithSignature('AuctionNotCleared()')); - _pool.kickReserveAuction(); - + _assertReserveAuctionUnsettledLiquidation(); + // settle auction with reserves changePrank(actor6); _settle({ diff --git a/tests/forge/utils/DSTestPlus.sol b/tests/forge/utils/DSTestPlus.sol index 0482437d5..d61ac8c5c 100644 --- a/tests/forge/utils/DSTestPlus.sol +++ b/tests/forge/utils/DSTestPlus.sol @@ -793,7 +793,7 @@ abstract contract DSTestPlus is Test, IPoolEvents { } function _assertReserveAuctionUnsettledLiquidation() internal { - vm.expectRevert(IPoolErrors.AuctionNotCleared.selector); + vm.expectRevert(IPoolErrors.AuctionActive.selector); _pool.kickReserveAuction(); }