Commit 1aedc3b
committed
Merge bitcoin/bitcoin#26618: rpc: Prevent unloading a wallet when rescanning
109cbb8 doc: Add release notes for #26618 (Aurèle Oulès)
b13902d rpc: Prevent unloading a wallet when rescanning (Aurèle Oulès)
Pull request description:
Fixes #26463.
This PR prevents a user from unloading a wallet if it is currently rescanning.
To test:
```bash
./src/bitcoin-cli -testnet -named createwallet wallet_name=wo disable_private_keys=true
./src/bitcoin-cli -testnet -rpcwallet=wo importdescriptors '[{
"desc": "addr(mmcuW74MyJUZuLnWXGQLoNXPrS9RbFz6gD)#tpnrahgc",
"timestamp": 0,
"active": false,
"internal": false,
"next": 0
}]'
./src/bitcoin-cli -testnet unloadwallet wo
error code: -4
error message:
Wallet is currently rescanning. Abort existing rescan or wait.
ACKs for top commit:
achow101:
ACK 109cbb8
w0xlt:
ACK bitcoin/bitcoin@109cbb8
kouloumos:
ACK 109cbb8
promag:
ACK 109cbb8
Tree-SHA512: 15fdddf4cf9f3fa08f52069fe4a25a76e04a55bb2586b031bfb0393dce7f175dcdb52823e132a7dff6a894539beeb980a1aad2a792790be036be6977628149b22 files changed
+17
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
445 | 445 | | |
446 | 446 | | |
447 | 447 | | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | 448 | | |
452 | | - | |
453 | | - | |
454 | | - | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
455 | 462 | | |
456 | 463 | | |
457 | 464 | | |
| |||
0 commit comments