test: cover index account history stage with stage_test_suite_ext tests#3383
test: cover index account history stage with stage_test_suite_ext tests#3383shekhirin merged 5 commits intoparadigmxyz:mainfrom
Conversation
|
@shekhirin PTAL :) |
Codecov Report
... and 213 files with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
I think what we want here is to seed the database with some random blocks and account changesets, as we do in e.g. Merkle stage:
reth/crates/stages/src/stages/merkle.rs
Line 472 in bb57556
Then, in validate_execution we should dynamically calculate the shards from database data, and compare it with the contents of AccountHistory table.
|
Ping @shekhirin |
| .collect::<Vec<_>>(); | ||
| let last_chunk = chunks.pop(); | ||
|
|
||
| chunks.into_iter().try_for_each(|list| -> Result<_, TestRunnerError> { |
There was a problem hiding this comment.
I don't see any ? or return Err, is this closure fallible? If not, we can do for_each
|
friendly ping @rakita |
| }; | ||
| use reth_primitives::{Address, BlockNumber, H256}; | ||
|
|
||
| stage_test_suite_ext!(IndexAccountHistoryTestRunner, index_account_history); |
There was a problem hiding this comment.
Would move this line as it is in between all includes and put it before IndexAccountHistoryTestRunner
and remove all new lines here
rakita
left a comment
There was a problem hiding this comment.
one nit, but otherwise it lgtm!
Thank you for the ping and I apologize for missing this I was on vacation week before.
fixes part of #3232