-
Notifications
You must be signed in to change notification settings - Fork 11
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
test(mempool): get txs multi nonce multi account validate replenishin… #502
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## ayelet/mempool/return-requested-txs-after-replenshing-get-txs #502 +/- ##
==============================================================================================
Coverage 81.85% 81.85%
==============================================================================================
Files 42 42
Lines 1857 1857
Branches 1857 1857
==============================================================================================
Hits 1520 1520
Misses 259 259
Partials 78 78 ☔ View full report in Codecov by Sentry. |
e63abfd
to
4aa3fe5
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 r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @ayeletstarkware, @elintul, and @giladchase)
crates/mempool/src/mempool_test.rs
line 225 at r1 (raw file):
// and processed after the transaction from account 1, even though it has a higher tip. assert_eq!(txs, &[tx_address_0_nonce_0, tx_address_1_nonce_0, tx_address_0_nonce_1]); let expected_mempool_state = MempoolState::new([], []);
Use Default.
Code quote:
MempoolState::new([], []);
crates/mempool/src/mempool_test.rs
line 226 at r1 (raw file):
assert_eq!(txs, &[tx_address_0_nonce_0, tx_address_1_nonce_0, tx_address_0_nonce_1]); let expected_mempool_state = MempoolState::new([], []); expected_mempool_state.assert_eq_mempool_state(&mempool);
Should we consider adding an is_empty
method?
Code quote:
let expected_mempool_state = MempoolState::new([], []);
expected_mempool_state.assert_eq_mempool_state(&mempool);
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 r1, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @ayeletstarkware, @giladchase, and @MohammadNassar1)
crates/mempool/src/mempool_test.rs
line 202 at r1 (raw file):
#[rstest] fn test_get_txs_multi_nonce_multi_account_validate_replenishing_queue() {
Suggestion:
test_get_txs_replenishes_queue_only_between_chunks
crates/mempool/src/mempool_test.rs
line 223 at r1 (raw file):
// Assert: all transactions are returned. The second transaction from account 0 is replenished // and processed after the transaction from account 1, even though it has a higher tip.
Suggestion:
// Assert: all transactions returned.
// Replenishment done in chunks: account 1 transaction is returned before the one of
// account 0, although its priority is higher.
crates/mempool/src/mempool_test.rs
line 225 at r1 (raw file):
Previously, MohammadNassar1 (mohammad-starkware) wrote…
Use Default.
Do we have empty()
?
crates/mempool/src/mempool_test.rs
line 226 at r1 (raw file):
Previously, MohammadNassar1 (mohammad-starkware) wrote…
Should we consider adding an
is_empty
method?
The following line should be readable enough:
MempoolState::empty().assert_eq_mempool_state(&mempool);
Although if repeated a lot, we can consider it (let's have a higher level overview after all tests are merged).
1991f1e
to
94e38d5
Compare
74f25f4
to
2563c19
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: all files reviewed, 2 unresolved discussions (waiting on @giladchase and @MohammadNassar1)
crates/mempool/src/mempool_test.rs
line 225 at r1 (raw file):
Previously, elintul (Elin) wrote…
Do we have
empty()
?
in a different PR.
crates/mempool/src/mempool_test.rs
line 226 at r1 (raw file):
Previously, elintul (Elin) wrote…
The following line should be readable enough:
MempoolState::empty().assert_eq_mempool_state(&mempool);Although if repeated a lot, we can consider it (let's have a higher level overview after all tests are merged).
Ok
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 r2, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @giladchase and @MohammadNassar1)
94e38d5
to
af61ce5
Compare
2563c19
to
cbc5c43
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 all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @giladchase)
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: complete! all files reviewed, all discussions resolved (waiting on @giladchase)
…g queue
This change is