-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix reorg threshold bug #5804
base: master
Are you sure you want to change the base?
Fix reorg threshold bug #5804
Conversation
3c10aba
to
51023d2
Compare
a313261
to
4c21ffe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
} else { | ||
self.reorg_threshold | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pretty minor, but AFAICT, we only need the ability to override the reorg threshold when debug assertions is on. Could we therefore have a variant of this function for #[cfg(not(debug_assertions))]
that doesn't touch the mutex?
@@ -109,6 +109,8 @@ fn assert_eq_ignore_backtrace(err: &SubgraphError, expected: &SubgraphError) { | |||
|
|||
#[tokio::test] | |||
async fn data_source_revert() -> anyhow::Result<()> { | |||
*TEST_WITH_NO_REORG.lock().unwrap() = true; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not entirely sure if these tests are run in parallel or not. But it might be better to reset TEST_WITH_NO_REORG
after this test is done.
No description provided.