Skip to content

Commit e2b8b6d

Browse files
maouehleoyvens
authored andcommitted
core: subgraph might continue processing to next block when an error occurred on a revert
The `continue` in the `instance_manager` run loop are actually doing a `continue` that continue to the next block in the stream. That meants to be `break`s instead so they actually go up to the outer loop which restart the subgraph.
1 parent f8d75a2 commit e2b8b6d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

core/src/subgraph/instance_manager.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,9 @@ where
545545
"block_hash" => format!("{}", subgraph_ptr.hash),
546546
"error" => e.to_string(),
547547
);
548-
continue;
548+
549+
// Exit inner block stream consumption loop and go up to loop that restarts subgraph
550+
break;
549551
}
550552
}
551553
None => {
@@ -575,7 +577,9 @@ where
575577
"block_hash" => format!("{}", subgraph_ptr.hash),
576578
"error" => e.to_string(),
577579
);
578-
continue;
580+
581+
// Exit inner block stream consumption loop and go up to loop that restarts subgraph
582+
break;
579583
}
580584
}
581585
}

0 commit comments

Comments
 (0)