-
Notifications
You must be signed in to change notification settings - Fork 35
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
feat(starknet_integration_tests): add snapshot tx generator fn #4075
base: noam.s/feat_starknet_integration_tests_add_update_revert_config
Are you sure you want to change the base?
Conversation
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
b6b9828
to
60be9d2
Compare
2489e4f
to
1788552
Compare
Benchmark movements: |
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.
Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @noamsp-starkware)
crates/mempool_test_utils/src/starknet_api_test_utils.rs
line 215 at r1 (raw file):
let mut account_tx_generators = Vec::new(); let nonce_manager = Rc::new(RefCell::new((*self.nonce_manager.borrow()).clone())); for tx_gen in self.account_tx_generators.iter() {
Change this to iterator functions
let account_tx_generators = self.account_tx_generators.iter().map(...).collect();
crates/mempool_test_utils/src/starknet_api_test_utils.rs
line 215 at r1 (raw file):
let mut account_tx_generators = Vec::new(); let nonce_manager = Rc::new(RefCell::new((*self.nonce_manager.borrow()).clone())); for tx_gen in self.account_tx_generators.iter() {
No need for iter in for loop. Just add & at the start of the container being iterated. If you accept my suggestion above this comment is irrelevant
crates/starknet_integration_tests/src/sequencer_manager.rs
line 199 at r1 (raw file):
} pub fn snapshot_tx_generator(&self) -> MultiAccountTransactionGenerator {
Change this to tx_generator which returns & and tx_generator_mut which returns &mut. In the test body call snapshot and assign the tx generator
c3b6ed9
to
f70ccf1
Compare
1788552
to
d11d2af
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.
Reviewable status: 1 of 3 files reviewed, 2 unresolved discussions (waiting on @ShahakShama)
crates/mempool_test_utils/src/starknet_api_test_utils.rs
line 215 at r1 (raw file):
Previously, ShahakShama wrote…
No need for iter in for loop. Just add & at the start of the container being iterated. If you accept my suggestion above this comment is irrelevant
Went with suggestion above.
crates/starknet_integration_tests/src/sequencer_manager.rs
line 199 at r1 (raw file):
Previously, ShahakShama wrote…
Change this to tx_generator which returns & and tx_generator_mut which returns &mut. In the test body call snapshot and assign the tx generator
Why do we need tx_generator_mut?
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.
Reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @noamsp-starkware)
crates/starknet_integration_tests/src/sequencer_manager.rs
line 199 at r1 (raw file):
Previously, noamsp-starkware wrote…
Why do we need tx_generator_mut?
answered in slack
f70ccf1
to
c082e20
Compare
7098149
to
c495fd7
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.
Reviewable status: 2 of 3 files reviewed, 1 unresolved discussion (waiting on @ShahakShama)
crates/starknet_integration_tests/src/sequencer_manager.rs
line 199 at r1 (raw file):
Previously, ShahakShama wrote…
answered in slack
Done.
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.
Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @noamsp-starkware)
c082e20
to
4093bd4
Compare
c495fd7
to
8f46461
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.
Reviewable status: 2 of 3 files reviewed, 1 unresolved discussion (waiting on @ShahakShama)
-- commits
line 2 at r4:
Commit scope (starknet_integration_tests
) is incorrect.
Code quote:
- 8f46461: feat(starknet_integration_tests): add snapshot tx generator fn
8f46461
to
bec9bef
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.
Reviewed 1 of 1 files at r4, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @noamsp-starkware)
No description provided.