-
Notifications
You must be signed in to change notification settings - Fork 311
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
Fix Wallet::descriptor_checksum
to actually return the checksum
#763
Fix Wallet::descriptor_checksum
to actually return the checksum
#763
Conversation
So these lines here... Line 208 in b14e4ee
Line 217 in b14e4ee
Essentially, we are getting the checksum of (descriptors+checksum)... This does not seem like wanted behavior? This needs to be fixed, but in a way that it doesn't result in incompatible databases. I think I have a way of fixing this while being backwards compatible. For adding new db checksums: Use checksum of (descriptor). @afilini @notmandatory Is this a good proposal? |
To add another wrinkle to this discussion, there's also a non-pub function in I think this is relevant in that we probably shouldn't implement our own EDIT: see ACK below. |
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.
ACK af0b369
Even though there may be more we can do to cleanup how checksums are done, this certainly fixes a clear bug and would be nice to get into the 0.23 release.
@notmandatory yes I agree with you. I think this PR fixes an API issue, everything else I've mentioned is really more internal. |
utACK af0b369 |
Oh nevermind, it looked too fun, I had to test it! 😄 ACK af0b369 - I run the test you added with the old code, and verified that the bug was there. I then run the test (with a few more dbg!() expressions) and manually verified that the problem is fixed. |
Description
Wallet::descriptor_checksum
should return the checksum, not the descriptor without the checksum.Notes to the reviewers
Please merge.
Changelog notice
Fix
Wallet::descriptor_checksum
to actually return the descriptor checksum.Checklists
All Submissions:
cargo fmt
andcargo clippy
before committingBugfixes:
* [ ] This pull request breaks the existing API* [ ] I'm linking the issue being fixed by this PR