-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
refactor: random_block(s) function #10499
Conversation
92c82c5
to
33110dc
Compare
7d44bb4
to
7ba1c18
Compare
7ba1c18
to
2ff861c
Compare
let blocks = random_block_range( | ||
&mut rng, | ||
1..=10, | ||
BlockParams { parent: Some(B256::ZERO), tx_count: Some(0..2), ..Default::default() }, |
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.
hmm why is this change from 2..3
to 0..2
required?
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 incorrect, but i think the test is rightfully failing- will fix in a bit, just debugging 2 other tests
@@ -2348,8 +2354,7 @@ mod tests { | |||
&mut rng, | |||
TEST_BLOCKS_COUNT, | |||
TEST_BLOCKS_COUNT, | |||
None, | |||
None, | |||
BlockParams::default(), |
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.
@shekhirin seems like the test_receipt_provider_* tests are failing on here. it seems to me like they are passing on main cos both lists are empty, debugging..
superseded by #10563 |
Closes #10457
Implementation Details:
BlockParams
used to pass arguments for random block generationrandom_block
(generates one block) +random_block_range
functions to use new struct (could've been done separately, but decided to combine both since they were so similar)