-
Notifications
You must be signed in to change notification settings - Fork 694
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
Remove ProspectiveParachainsMode
usage in backing subsystem
#6215
base: master
Are you sure you want to change the base?
Conversation
|
||
// Test that the candidate reaches quorum successfully. | ||
#[test] | ||
fn backing_works() { |
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 test is completely removed since it overlaps with backing_works
from mod.rs
} | ||
responses.push_back(futures::future::ok((true, head)).boxed()); | ||
} | ||
for head in implicit_view.all_allowed_relay_parents() { |
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.
we only need to do this for active leaves. We only care if we can back something on an active leaf. Prospective parachains will take the possible ancestry into account
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.
Yes, I should use leaves()
instead. Fixed.
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.
Are you going to remove ProspectiveParachainsMode by subsystem and then the enum inself?
|
||
// Check that subsystem job issues a request for the availability cores. | ||
async fn assert_validate_from_exhaustive( |
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.
nit: It might be more convenient to wrap assertions in macros instead of functions. If nothing has changed recently, failed tests with functions point to the line in the function itself rather than the specific line in the test.
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.
That's a fair point but the macros add additional complexity. You can also set RUST_BACKTRACE=1
, get a stack trace and see where exactly the assert function has failed.
Actually I want to remove I plan to do exactly what you suggested but after I am done with |
Since async backing parameters runtime api is released on all networks the code in backing subsystem can be simplified by removing the usages of
ProspectiveParachainsMode
and keeping only the branches of the code underProspectiveParachainsMode::Enabled
.The PR does that and reworks the tests in mod.rs to use async backing. It's a preparation for #5079