-
Notifications
You must be signed in to change notification settings - Fork 1
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: test_tree_with_sibling_nodes #53
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #53 +/- ##
==========================================
- Coverage 72.68% 72.09% -0.60%
==========================================
Files 19 19
Lines 637 688 +51
Branches 637 688 +51
==========================================
+ Hits 463 496 +33
- Misses 144 163 +19
+ Partials 30 29 -1 ☔ View full report in Codecov by Sentry. |
ea70c6e
to
a897875
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, 3 unresolved discussions (waiting on @amosStarkware, @aner-starkware, and @AvivYossef-starkware)
crates/committer/src/patricia_merkle_tree/updated_skeleton_tree_test.rs
line 185 at r2 (raw file):
/// \ /// i=35: leaf /// v=1
PTAL at create_X_entry_for_testing
functions (for X
in {binary, edge, leaf}
).
These test utils are for filled nodes, but it would help if you create helper functions for skeleton nodes as well - will be useful here, may reduce boilerplate and lines in this current test
crates/committer/src/patricia_merkle_tree/updated_skeleton_tree_test.rs
line 198 at r2 (raw file):
}, ); // A sibling node with hash value 0x2955a96b09495fb2ce4ed65cf679c54e54aefc2c6972d7f3042590000bb7543
redundant comment IMO, and it's a shame to write the hash value several times (comment maintenance).
non blocking
Code quote:
// A sibling node with hash value 0x2955a96b09495fb2ce4ed65cf679c54e54aefc2c6972d7f3042590000bb7543
crates/committer/src/patricia_merkle_tree/updated_skeleton_tree_test.rs
line 216 at r2 (raw file):
}, ); // A sibling node with hash value 0x39eb7b85bcc9deac314406d6b73154b09b008f8af05e2f58ab623f4201d0b88
redundant
Code quote:
// A sibling node with hash value 0x39eb7b85bcc9deac314406d6b73154b09b008f8af05e2f58ab623f4201d0b88
a897875
to
b95795a
Compare
Previously, dorimedini-starkware wrote…
Like this? Should I modify the test above the same way? |
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 r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @amosStarkware, @aner-starkware, and @AvivYossef-starkware)
crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/node.rs
line 6 at r3 (raw file):
#[allow(dead_code)] #[derive(Clone, Copy)]
since you had to add the derive I'm guessing this code isn't dead anymore? non-blocking
Suggestion:
#[derive(Clone, Copy)]
crates/committer/src/patricia_merkle_tree/updated_skeleton_tree_test.rs
line 185 at r2 (raw file):
Previously, aner-starkware wrote…
Like this? Should I modify the test above the same way?
if it makes sense and reduces boilerplate, yes please :)
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, 1 unresolved discussion (waiting on @amosStarkware, @aner-starkware, and @AvivYossef-starkware)
b95795a
to
c75ad75
Compare
c75ad75
to
1e12d62
Compare
Previously, dorimedini-starkware wrote…
I used it in a test, so I don't think it would have been related, but actually, I didn't need the clone in the end. |
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, 1 unresolved discussion (waiting on @amosStarkware, @AvivYossef-starkware, and @dorimedini-starkware)
crates/committer/src/patricia_merkle_tree/updated_skeleton_tree_test.rs
line 185 at r2 (raw file):
Previously, dorimedini-starkware wrote…
if it makes sense and reduces boilerplate, yes please :)
OK, done.
This change is