Judge has assessed an item in Issue #130 as 2 risk. The relevant finding follows:
Possible Infinite Loops
If the condition triggers the continue, then the loop variable does not get incremented. The condition never changes, as the same condition is checked over and over again, resulting in an infinite loop.
Judge has assessed an item in Issue #130 as 2 risk. The relevant finding follows:
Possible Infinite Loops If the condition triggers the continue, then the loop variable does not get incremented. The condition never changes, as the same condition is checked over and over again, resulting in an infinite loop.
File: contracts/PermissionedNodeRegistry.sol
207: if (!operatorStructById[i].active) { 208: continue; 209: } Link: https://github.com/code-423n4/2023-06-stader/blob/main/contracts/PermissionedNodeRegistry.sol#L207-L209
Fix: Reverse the condition and put everything inside the if block. Keep i++ outside the if block.
File: contracts/PermissionedNodeRegistry.sol
227: if (!operatorStructById[i].active) { 228: continue; 229: } https://github.com/code-423n4/2023-06-stader/blob/main/contracts/PermissionedNodeRegistry.sol#L227-L229