-
Notifications
You must be signed in to change notification settings - Fork 221
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
Refactor init_requester #152
Conversation
tendermint/src/lite/verifier.rs
Outdated
@@ -377,15 +377,16 @@ mod tests { | |||
// create an initial trusted state from the given vals | |||
fn init_trusted_state( | |||
vals_vec: Vec<usize>, | |||
commit_vec: Vec<usize>, |
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.
Hmm, now that we use a pair ValsAndCommit
below, should we use it here too?
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.
Yes, will do that 👍
tendermint/src/lite/verifier.rs
Outdated
@@ -404,19 +405,32 @@ mod tests { | |||
(MockSignedHeader::new(commit, header), vals, next_vals) | |||
} | |||
|
|||
|
|||
// TODO: find a better name |
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.
I think the name is actually OK (especially as this "just" test-code).
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.
👍
Codecov Report
@@ Coverage Diff @@
## ismail/132_141_followup #152 +/- ##
==========================================================
+ Coverage 36.73% 37.6% +0.86%
==========================================================
Files 90 90
Lines 3174 3231 +57
Branches 497 497
==========================================================
+ Hits 1166 1215 +49
- Misses 1748 1756 +8
Partials 260 260
Continue to review full report at Codecov.
|
* Valid TrustThresholdFraction for real * Further simplify tests: init requester with final state * Apply review suggestions and assert_bisection_err fn * remove redundant clone * add another err case * unpublicize verify_commit_full and verify_commit_trusting (ref #136) * ensure the untrusted_header.bft_time() > trusted_header.bft_time() * Fix failing test and test and add another erroring one * remove dupl test * Consistent comments in tests * Refactor init_requester (#152) * added bisection test for insufficient commits * refactored init_requester, TODO: update tests * fixed tests * Added bisection test for insufficient commits * fixed failures * cargo fmt * Changed tests to use ValsAndCommit struct * satisfy clippy * Dealing with the merge conflict's aftermath Co-authored-by: Shivani Joshi <46731446+Shivani912@users.noreply.github.com>
Updates: