Commit b8cefeb
committed
Merge bitcoin/bitcoin#32149: wallet, migration: Fix empty wallet crash
0f602c5 wallet, migration: Fix crash on empty wallet (pablomartin4btc)
42c1314 wallet, refactor: Decouple into HasLegacyRecords() (pablomartin4btc)
Pull request description:
Same as with a blank wallet (#28976), wallets with no legacy records (i.e. empty, non-blank, watch-only wallet) do not require to be migrated.
Steps to reproduce the issue:
1.- `createwallet "empty_wo_noblank_legacy_wallet" true false "" false false`
2.- `migratewallet`
```
wallet/wallet.cpp:4071 GetDescriptorsForLegacy: Assertion `legacy_spkm' failed.
Aborted (core dumped)
```
ACKs for top commit:
davidgumberg:
untested reACK bitcoin/bitcoin@0f602c5
fjahr:
re-ACK 0f602c5
achow101:
ACK 0f602c5
furszy:
ACK 0f602c5
BrandonOdiwuor:
Code Review ACK 0f602c5
Tree-SHA512: 796c3f0b1946281097f7ffc3563bc79f879e80a98237012535cc530a4a2239fd2d71a17b4f54e30258886dc9f0b83206d7a5d50312e4fc6d0abe4f559fbe07ecFile tree
5 files changed
+51
-20
lines changed- src/wallet
- test
- test/functional
5 files changed
+51
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
50 | 51 | | |
| 52 | + | |
51 | 53 | | |
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
| 57 | + | |
55 | 58 | | |
56 | 59 | | |
57 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4534 | 4534 | | |
4535 | 4535 | | |
4536 | 4536 | | |
4537 | | - | |
4538 | | - | |
4539 | | - | |
| 4537 | + | |
| 4538 | + | |
4540 | 4539 | | |
4541 | 4540 | | |
4542 | 4541 | | |
4543 | 4542 | | |
| 4543 | + | |
4544 | 4544 | | |
4545 | 4545 | | |
4546 | 4546 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
540 | 540 | | |
541 | 541 | | |
542 | 542 | | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
543 | 572 | | |
544 | 573 | | |
545 | 574 | | |
546 | 575 | | |
547 | 576 | | |
548 | 577 | | |
549 | 578 | | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | | - | |
554 | | - | |
555 | | - | |
556 | | - | |
557 | | - | |
558 | | - | |
559 | | - | |
560 | | - | |
561 | | - | |
562 | | - | |
563 | | - | |
564 | | - | |
565 | | - | |
566 | | - | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
567 | 582 | | |
568 | 583 | | |
569 | 584 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
336 | 340 | | |
337 | 341 | | |
338 | 342 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
445 | 445 | | |
446 | 446 | | |
447 | 447 | | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
448 | 457 | | |
449 | 458 | | |
450 | 459 | | |
| |||
0 commit comments