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. |
notmandatory
left a comment
There was a problem hiding this comment.
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_checksumshould return the checksum, not the descriptor without the checksum.Notes to the reviewers
Please merge.
Changelog notice
Fix
Wallet::descriptor_checksumto actually return the descriptor checksum.Checklists
All Submissions:
cargo fmtandcargo clippybefore committingBugfixes:
* [ ] This pull request breaks the existing API* [ ] I'm linking the issue being fixed by this PR