Commit e2f2df0
committed
Merge bitcoin/bitcoin#32984: wallet: Set migrated wallet name only on success
060695c test: Failed load after migrate should restore backup (MarcoFalke)
8a4cfdd wallet: Set migrated wallet name only on success (Ava Chow)
Pull request description:
After a wallet is migrated and we are trying to load it, if it could not be loaded, don't try to set the wallet name. Otherwise we have a segfault.
This can be tested by migrated a legacy wallet from another network (e.g. trying to migrate a testnet wallet on mainnet). The fixed behavior is return an error and restore the backup.
ACKs for top commit:
davidgumberg:
ACK 060695c
furszy:
ACK 060695c
rkrux:
ACK 060695c
w0xlt:
reACK bitcoin/bitcoin@060695c
pablomartin4btc:
ACK 060695c
Tree-SHA512: f4289e0b3dedef0a3d734c18604f2fd0df0dc65e9641bc342cfa45088d2540a3f6631bbea8bdd394b2631fa83b38e8ac37c83cfc4b53b19dcbd0b820a9beb6e42 files changed
+30
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4306 | 4306 | | |
4307 | 4307 | | |
4308 | 4308 | | |
4309 | | - | |
| 4309 | + | |
4310 | 4310 | | |
4311 | 4311 | | |
4312 | 4312 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
68 | 74 | | |
69 | 75 | | |
70 | 76 | | |
| |||
916 | 922 | | |
917 | 923 | | |
918 | 924 | | |
919 | | - | |
920 | | - | |
921 | | - | |
922 | | - | |
| 925 | + | |
923 | 926 | | |
924 | 927 | | |
925 | 928 | | |
| |||
1372 | 1375 | | |
1373 | 1376 | | |
1374 | 1377 | | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
1375 | 1399 | | |
1376 | 1400 | | |
1377 | 1401 | | |
| |||
1404 | 1428 | | |
1405 | 1429 | | |
1406 | 1430 | | |
| 1431 | + | |
1407 | 1432 | | |
1408 | 1433 | | |
1409 | 1434 | | |
0 commit comments