-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
22 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,9 +74,7 @@ contract TokenRateNotifier is Ownable, IPostTokenRebaseReceiver { | |
uint256, | ||
uint256 | ||
) external { | ||
uint256 obLength = observersLength(); | ||
|
||
for (uint256 obIndex = 0; obIndex < obLength; obIndex++) { | ||
for (uint256 obIndex = 0; obIndex < observers.length; obIndex++) { | ||
try ITokenRatePusher(observers[obIndex]).pushTokenRate() {} | ||
catch (bytes memory lowLevelRevertData) { | ||
Check warning Code scanning / Slither Uninitialized local variables Medium
TokenRateNotifier.handlePostTokenRebase(uint256,uint256,uint256,uint256,uint256,uint256,uint256).lowLevelRevertData is a local variable never initialized
|
||
/// @dev This check is required to prevent incorrect gas estimation of the method. | ||
|
@@ -102,9 +100,7 @@ contract TokenRateNotifier is Ownable, IPostTokenRebaseReceiver { | |
/// @notice `observer_` index in `observers` array. | ||
/// @return An index of `observer_` or `INDEX_NOT_FOUND` if it wasn't found. | ||
function _observerIndex(address observer_) internal view returns (uint256) { | ||
uint256 obLength = observersLength(); | ||
|
||
for (uint256 obIndex = 0; obIndex < obLength; obIndex++) { | ||
for (uint256 obIndex = 0; obIndex < observers.length; obIndex++) { | ||
if (observers[obIndex] == observer_) { | ||
return obIndex; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters