-
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): add commit block test invalid argument #491
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #491 +/- ##
=======================================
Coverage 81.21% 81.21%
=======================================
Files 42 42
Lines 1826 1826
Branches 1826 1826
=======================================
Hits 1483 1483
Misses 269 269
Partials 74 74 ☔ View full report in Codecov by Sentry. |
c49c443
to
da55752
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 r2, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @MohammadNassar1)
crates/mempool/src/mempool_test.rs
line 365 at r2 (raw file):
assert_eq!(txs, &[input_address_0_nonce_0.tx]); }
How can we reduce transaction cloning to once per test?
crates/mempool/src/mempool_test.rs
line 388 at r2 (raw file):
let invalid_commit_state = HashMap::from([(contract_address!("0x0"), AccountState { nonce: Nonce(felt!(3_u16)) })]);
Why is this invalid? Maybe the transaction was rejected/not inserted into the block due to space?
Code quote:
let invalid_commit_state =
HashMap::from([(contract_address!("0x0"), AccountState { nonce: Nonce(felt!(3_u16)) })]);
da55752
to
32dfad7
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: 0 of 1 files reviewed, 2 unresolved discussions (waiting on @elintul)
crates/mempool/src/mempool_test.rs
line 388 at r2 (raw file):
Previously, elintul (Elin) wrote…
Why is this invalid? Maybe the transaction was rejected/not inserted into the block due to space?
Note that in the block state, the nonce was decreased, which is illegal.
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: 0 of 1 files reviewed, 2 unresolved discussions (waiting on @elintul)
crates/mempool/src/mempool_test.rs
line 365 at r2 (raw file):
Previously, elintul (Elin) wrote…
How can we reduce transaction cloning to once per test?
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: all files reviewed, 1 unresolved discussion (waiting on @MohammadNassar1)
crates/mempool/src/mempool_test.rs
line 388 at r2 (raw file):
Previously, MohammadNassar1 (mohammad-starkware) wrote…
Note that in the block state, the nonce was decreased, which is illegal.
I see, then what's our behavior in this case?
This change is