fix(rusqlite): fix get_pre_1_wallet_keychains migration helper - #411
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #411 +/- ##
==========================================
+ Coverage 79.77% 80.04% +0.26%
==========================================
Files 24 24
Lines 5266 5336 +70
Branches 241 242 +1
==========================================
+ Hits 4201 4271 +70
+ Misses 988 987 -1
- Partials 77 78 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
69b3b27 to
6fc319d
Compare
|
I'd like to get this into the 3.0 release and then I'll back port the patch to the release/2.x branch. |
6fc319d to
fc18db5
Compare
|
WIP update to example usage for book-of-bdk is here: https://github.com/notmandatory/book-of-bdk/blob/838a1b099fe378decb4909da356115db13435413/examples/rust/migrate-version/src/main.rs |
2fab1b5 to
849f88f
Compare
|
I re-pushed my commit with refactored and expanded test coverage, compliments of 🤖 LLM helper. |
oleonardolima
left a comment
There was a problem hiding this comment.
utACK 849f88f
Overall looks good! I'll try to test it following bitcoindevkit/book-of-bdk#147
|
You're using a lot of |
|
@notmandatory I updated it to apply the |
|
Thanks @oleonardolima I cherry-picked your commits, these are good improvements addressing @ValuedMammal's comment. |
|
I added #415 as a back port of this PR to the |
|
In 849f88f: fix(rusqlite): fix get_pre_1_wallet_keychains migration helper Can you include a newline before the body of the commit message? |
5712f03 to
870393e
Compare
oleonardolima
left a comment
There was a problem hiding this comment.
tACK a399408
I've tested it by using bdk-cli v0.27.1 importing and syncing the same testnet4 descriptors we have in examples.
I used the code from bitcoindevkit/book-of-bdk#147 and it created the new database as expected, and I did a sync with it's initial state.
|
nit: it could probably be squashed into a single commit, though it's not a blocker. |
|
I'll squash it. |
- add PreV1MigrationError - rename Pre1WalletKeychain to PreV1WalletKeychain - rename get_pre_1_wallet_keychains to get_pre_v1_wallet_keychains - change PreV1WalletKeychain::keychain to KeychainKind - change PreV1WalletKeychain::checksum to String - refactored and expanded migration tests with LLM 🤖 - style: require `rusqlite` feature in migration mod - apply `[cfg(feature = "rusqlite")] for `migration` module instead of having multiple ones in `migration.rs`.
870393e to
c730973
Compare
oleonardolima
left a comment
There was a problem hiding this comment.
tACK c730973
I ran the test on the new commit.
|
ACK c730973 |
fc233b2 fix(rusqlite): fix get_pre_v1_wallet_keychains migration helper (Steve Myers) Pull request description: ### Description Backports #411 to the `release/2.x` branch. ### Notes to the reviewers No changes to the original PR. ### Changelog notice Add get_pre_v1_wallet_keychains to assist migration from pre-1.0 bdk wallets. ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) * [x] I ran `just p` before pushing #### New Features: * [x] I've added tests for the new feature * [x] I've added docs for the new feature ACKs for top commit: ValuedMammal: ACK fc233b2 Tree-SHA512: eb78a965b7e170fce19896a65f3a26707555adb0743aaa31fe8423218409ddc884c465ced700c059b1a327cbc9d2953774c156f904472965362b8f8f5775331e
Description
While working on bitcoindevkit/book-of-bdk#141 I found some very rough edges with how I'd implemented the Pre1WalletKeychain struct. I've fixed these and added a new Pre1MigrationError type to cover new possible errors when parsing keychain name and checksum bytes.
Notes to the reviewers
Changelog notice
Replace changelog notice from #364 to:
Add get_pre_v1_wallet_keychains to assist migration from pre-1.0 bdk wallets.
Checklists
All Submissions:
just pbefore pushingBugfixes: