mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Merge branch 'master' into fix/45
This commit is contained in:
commit
332cdff67a
|
@ -47,7 +47,7 @@ contract LendingPool is VersionedInitializable, ILendingPool, LendingPoolStorage
|
||||||
uint256 public constant REBALANCE_UP_USAGE_RATIO_THRESHOLD = 0.95 * 1e27; //usage ratio of 95%
|
uint256 public constant REBALANCE_UP_USAGE_RATIO_THRESHOLD = 0.95 * 1e27; //usage ratio of 95%
|
||||||
uint256 public constant MAX_STABLE_RATE_BORROW_SIZE_PERCENT = 25;
|
uint256 public constant MAX_STABLE_RATE_BORROW_SIZE_PERCENT = 25;
|
||||||
uint256 public constant FLASHLOAN_PREMIUM_TOTAL = 9;
|
uint256 public constant FLASHLOAN_PREMIUM_TOTAL = 9;
|
||||||
uint256 public constant UINT_MAX_VALUE = uint256(-1);
|
uint256 public constant MAX_NUMBER_RESERVES = 128;
|
||||||
uint256 public constant LENDINGPOOL_REVISION = 0x2;
|
uint256 public constant LENDINGPOOL_REVISION = 0x2;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -940,6 +940,7 @@ contract LendingPool is VersionedInitializable, ILendingPool, LendingPoolStorage
|
||||||
**/
|
**/
|
||||||
function _addReserveToList(address asset) internal {
|
function _addReserveToList(address asset) internal {
|
||||||
bool reserveAlreadyAdded = false;
|
bool reserveAlreadyAdded = false;
|
||||||
|
require(_reservesList.length < MAX_NUMBER_RESERVES, Errors.NO_MORE_RESERVES_ALLOWED);
|
||||||
for (uint256 i = 0; i < _reservesList.length; i++)
|
for (uint256 i = 0; i < _reservesList.length; i++)
|
||||||
if (_reservesList[i] == asset) {
|
if (_reservesList[i] == asset) {
|
||||||
reserveAlreadyAdded = true;
|
reserveAlreadyAdded = true;
|
||||||
|
|
|
@ -43,6 +43,7 @@ library Errors {
|
||||||
string public constant FAILED_REPAY_WITH_COLLATERAL = '53';
|
string public constant FAILED_REPAY_WITH_COLLATERAL = '53';
|
||||||
string public constant FAILED_COLLATERAL_SWAP = '55';
|
string public constant FAILED_COLLATERAL_SWAP = '55';
|
||||||
string public constant INVALID_EQUAL_ASSETS_TO_SWAP = '56';
|
string public constant INVALID_EQUAL_ASSETS_TO_SWAP = '56';
|
||||||
|
string public constant NO_MORE_RESERVES_ALLOWED = '59';
|
||||||
|
|
||||||
// require error messages - aToken
|
// require error messages - aToken
|
||||||
string public constant CALLER_MUST_BE_LENDING_POOL = '28'; // 'The caller of this function must be a lending pool'
|
string public constant CALLER_MUST_BE_LENDING_POOL = '28'; // 'The caller of this function must be a lending pool'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user