Skip to content

Commit 6cfc444

Browse files
shuaibbapputtylutter
authored andcommitted
graph: modify graft validation checks
1 parent 802a428 commit 6cfc444

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

graph/src/data/subgraph/mod.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -500,13 +500,7 @@ impl Graft {
500500
// The graft point must be at least `reorg_threshold` blocks
501501
// behind the subgraph head so that a reorg can not affect the
502502
// data that we copy for grafting
503-
//
504-
// This is pretty nasty: we have tests in the subgraph runner
505-
// tests that graft onto the subgraph head directly. We
506-
// therefore skip this check in debug builds and only turn it on
507-
// in release builds
508-
#[cfg(not(debug_assertions))]
509-
(Some(ptr), true) if self.block + ENV_VARS.reorg_threshold >= ptr.number => Err(GraftBaseInvalid(format!(
503+
(Some(ptr), true) if self.block + ENV_VARS.reorg_threshold > ptr.number => Err(GraftBaseInvalid(format!(
510504
"failed to graft onto `{}` at block {} since it's only at block {} which is within the reorg threshold of {} blocks",
511505
self.base, self.block, ptr.number, ENV_VARS.reorg_threshold
512506
))),

0 commit comments

Comments
 (0)