mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
- Optimized length load on _addToAddressesProvidersList().
This commit is contained in:
parent
ea66bf3170
commit
c14ea749c4
|
@ -76,7 +76,9 @@ contract LendingPoolAddressesProviderRegistry is Ownable, ILendingPoolAddressesP
|
|||
* @param provider the pool address to be added
|
||||
**/
|
||||
function _addToAddressesProvidersList(address provider) internal {
|
||||
for (uint256 i = 0; i < _addressesProvidersList.length; i++) {
|
||||
uint256 providersCount = _addressesProvidersList.length;
|
||||
|
||||
for (uint256 i = 0; i < providersCount; i++) {
|
||||
if (_addressesProvidersList[i] == provider) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user