-
Notifications
You must be signed in to change notification settings - Fork 405
Add .to_best_block()
method to ValidatedBlockHeader
#1777
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
Add .to_best_block()
method to ValidatedBlockHeader
#1777
Conversation
Codecov ReportBase: 90.86% // Head: 90.77% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1777 +/- ##
==========================================
- Coverage 90.86% 90.77% -0.09%
==========================================
Files 86 87 +1
Lines 46482 46969 +487
Branches 46482 46969 +487
==========================================
+ Hits 42234 42637 +403
- Misses 4248 4332 +84
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
a384bb1
to
1712a13
Compare
Pushed changes @jkczyz, removed the new |
validate_best_block_header_and_best_block()
.best_block()
method to ValidatedBlockHeader
1712a13
to
4d75a90
Compare
.best_block()
method to ValidatedBlockHeader
.to_best_block()
method to ValidatedBlockHeader
4d75a90
to
a9f8b6e
Compare
Implemented once again @jkczyz |
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.
Thanks for putting this together!
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
Adds a new method
.to_best_block()
toValidatedBlockHeader
which returns aBestBlock
that nodes can pass into the channel manager during a fresh start, in order to prevent a possible race condition which eventually results in a channel manager panic when a node is started for the first time.Required for the bugfix in lightningdevkit/ldk-sample#78.