Enable graft validation checks for debug
Closes https://github.com/graphprotocol/graph-node/issues/5197
Fix graft validation checks
- Removed the conditional compilation for reorg threshold checks in debug builds
This will be good to go as we have reorg_threshold set to 0 on debug builds.
https://github.com/graphprotocol/graph-node/blob/b0c89526fd932393f3e43350ee664404eb858040/graph/src/env/mod.rs#L238-L241
@lutter @incrypto32 would appreciate a review of this PR.
Interesting. This used to fail CI; do you have any idea where the reorg threshold is set to 0 when we run tests?
Yep, this used to fail before. The reason for the change in behavior is that at the time the issue was opened, the cfg!(debug_assertions) macro wasn't being used to set the reorg threshold in debug mode.
And now, while running tests (which are typically in debug mode), the cfg!(debug_assertions) macro is being applied, and the reorg threshold is set to 0 by default. unless explicitly set by "ETHEREUM_REORG_THRESHOLD" env var