-
Notifications
You must be signed in to change notification settings - Fork 339
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
Use ChainHash
instead of BlockHash
as applicable
#2662
Use ChainHash
instead of BlockHash
as applicable
#2662
Conversation
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #2662 +/- ##
=======================================
Coverage 89.06% 89.06%
=======================================
Files 112 112
Lines 87417 87417
Branches 87417 87417
=======================================
+ Hits 77856 77861 +5
+ Misses 7322 7320 -2
+ Partials 2239 2236 -3
☔ View full report in Codecov by Sentry. |
0acd9eb
to
d7a4f31
Compare
@TheBlueMatt I'm at a loss as to why the full stack fuzz test uses a seemingly incorrect chain hash of rust-lightning/fuzz/src/full_stack.rs Line 775 in 2c51080
But when initializing rust-lightning/fuzz/src/full_stack.rs Lines 459 to 464 in 2c51080
rust-lightning/lightning/src/ln/channelmanager.rs Line 2261 in 2c51080
However, it is the expected
|
Yes, the fuzz environment makes sha256 a simple xor of the input bytes, so block hashes are calculated totally differently. Thus, the previous code that actually hashed the genesis block got that value, but now we're fetching from the hard-coded hash in rust-bitcoin, so we need the real value. If you just swap it out it WFM. |
d7a4f31
to
e374ddc
Compare
Ah, thanks! Should be working now. |
CI is quite sad, may need a rebase. |
LGTM after CI fix. |
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.
Cool, I see what's going on in the msg tests that were updated.
LGTM
ChainHash is more appropriate for places where an arbitrary BlockHash is not desirable. This type was introduced in later versions of the bitcoin crate, thus BlockHash was used instead. Using ChainHash also makes it easier to check if ChannelManager is compatible with an Offer.
e374ddc
to
54f96ef
Compare
Rebased |
22a0bfc
into
lightningdevkit:main
ChainHash
is more appropriate for places where an arbitraryBlockHash
is not desirable. This type was introduced in later versions of thebitcoin
crate, thusBlockHash
was used instead.Using
ChainHash
also makes it easier to check ifChannelManager
is compatible with anOffer
.