Commit 0c24748
Merge bitcoin#28976: wallet: Fix migration of blank wallets
c11c404 tests: Test migration of blank wallets (Andrew Chow)
563b2a6 wallet: Better error message when missing LegacySPKM during migration (Andrew Chow)
b1d2c77 wallet: Check for descriptors flag before migration (Andrew Chow)
8c127ff wallet: Skip key and script migration for blank wallets (Andrew Chow)
Pull request description:
Blank wallets (wallets without any keys are scripts) are being detected as already being descriptor wallets even though they are not. This is because the check for whether a wallet is already a descriptor wallet uses the presence of a `LegacyScriptPubKeyMan` which is only setup when keys or scripts are found. This PR resolves this issue by checking for the descriptor wallet flag instead and subsequently skipping the keys and scripts part of migration for blank wallets.
Fixes the issue mentioned in bitcoin#28868 (comment)
ACKs for top commit:
furszy:
reACK c11c404. CI failure is unrelated.
ryanofsky:
Code review ACK c11c404
Tree-SHA512: 2466fdf1542eb8489c841253191f85dc88365493f0bb3395b67dee3e43709a9993c68b9d7623657b54b779adbe68fc81962d60efef4802c5d461f154167af7f41 parent dac3c8d commit 0c24748
2 files changed
Lines changed: 25 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4401 | 4401 | | |
4402 | 4402 | | |
4403 | 4403 | | |
4404 | | - | |
| 4404 | + | |
| 4405 | + | |
| 4406 | + | |
| 4407 | + | |
| 4408 | + | |
4405 | 4409 | | |
4406 | 4410 | | |
4407 | 4411 | | |
| |||
4416 | 4420 | | |
4417 | 4421 | | |
4418 | 4422 | | |
4419 | | - | |
4420 | | - | |
| 4423 | + | |
| 4424 | + | |
| 4425 | + | |
4421 | 4426 | | |
4422 | 4427 | | |
4423 | 4428 | | |
| |||
4743 | 4748 | | |
4744 | 4749 | | |
4745 | 4750 | | |
4746 | | - | |
| 4751 | + | |
4747 | 4752 | | |
4748 | 4753 | | |
4749 | 4754 | | |
| |||
4790 | 4795 | | |
4791 | 4796 | | |
4792 | 4797 | | |
4793 | | - | |
4794 | | - | |
| 4798 | + | |
| 4799 | + | |
| 4800 | + | |
| 4801 | + | |
| 4802 | + | |
4795 | 4803 | | |
4796 | 4804 | | |
4797 | 4805 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
| 40 | + | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
| |||
532 | 531 | | |
533 | 532 | | |
534 | 533 | | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
535 | 542 | | |
536 | 543 | | |
537 | 544 | | |
| |||
545 | 552 | | |
546 | 553 | | |
547 | 554 | | |
| 555 | + | |
548 | 556 | | |
549 | 557 | | |
550 | 558 | | |
0 commit comments