-
Notifications
You must be signed in to change notification settings - Fork 385
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
Increase poll::Validate visibility to pub #956
Increase poll::Validate visibility to pub #956
Conversation
Codecov Report
@@ Coverage Diff @@
## main #956 +/- ##
==========================================
- Coverage 90.59% 90.57% -0.02%
==========================================
Files 60 60
Lines 30423 30423
==========================================
- Hits 27561 27555 -6
- Misses 2862 2868 +6
Continue to review full report at Codecov.
|
Hmm, do we actually need to expose |
Yeah, just needed for callers. |
2f7065e
to
14b79bc
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.
LGTM aside from the one comment
Previously, poll::Validate was pub(crate) to force external implementors of Poll to define their implementation in terms of ChainPoller. This was because ChainPoller::look_up_previous_header checks for consistency between headers and any errors would be checked at that level rather than by the caller. Otherwise, if performed by the caller, a Poll implementation would not be aware if the underlying BlockSource was providing bad data and therefore couldn't react accordingly. Widening the visibility to pub relaxes this requirement, although it's still encourage to use ChainPoller to implement Poll. This permits either copying or moving lightning-block-sync's test utilities to a separate crate since they use poll::Validate.
14b79bc
to
7302c8c
Compare
Widening the visibility to pub relaxes this requirement permits either copying or moving
lightning-block-sync
's test utilities to a separate crate since they usepoll::Validate
.