-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
| info!("[batch_index] Backfilling complete, terminating backfilling process."); |
Description:
In the BatchIndexer::index method, there are redundant checks for the current_backfilling_block_number value:
- The first check terminates the loop when
current_backfilling_block_numberequals 0. - Immediately following, an
if-elseblock checks ifcurrent_backfilling_block_numberis greater than 0; theelsebranch repeats the termination logic.
Since the non-positive case is already handled, the second else branch can be removed to simplify the control flow.
Proposed Fix:
Remove the redundant else branch. After the initial check for zero, you can safely assume that current_backfilling_block_number is positive in the subsequent conditional.
Impact:
Streamlines the logic, improves readability, and reduces unnecessary conditional branching.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels