Merge branch 'feat/81-optimization-addresses-prov-reg' into 'master'

Fixes #81

Closes #81

See merge request aave-tech/protocol-v2!90
This commit is contained in:
Ernesto Boado 2020-10-27 09:28:26 +00:00
commit af1311a536

View File

@ -76,7 +76,9 @@ contract LendingPoolAddressesProviderRegistry is Ownable, ILendingPoolAddressesP
* @param provider the pool address to be added * @param provider the pool address to be added
**/ **/
function _addToAddressesProvidersList(address provider) internal { 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) { if (_addressesProvidersList[i] == provider) {
return; return;
} }