Skip to content

Commit fa7e311

Browse files
author
MarcoFalke
committed
[doc] rpcwallet: Only fail rescan when blocks have been pruned
1 parent aaaa57c commit fa7e311

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

doc/release-notes.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,16 @@ Configuration
8888
the selected network. This change takes only effect if the selected network
8989
is not mainnet.
9090

91+
Wallet
92+
------
93+
94+
- When in pruned mode, a rescan that was triggered by an `importwallet`,
95+
`importpubkey`, `importaddress`, or `importprivkey` RPC will only fail when
96+
blocks have been pruned. Previously it would fail when `-prune` has been set.
97+
This change allows to set `-prune` to a high value (e.g. the disk size) and
98+
the calls to any of the import RPCs would fail when the first block is
99+
pruned.
100+
91101
Credits
92102
=======
93103

src/wallet/rpcdump.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ UniValue importwallet(const JSONRPCRequest& request)
586586
// Exit early and print an error.
587587
// If a block is pruned after this check, we will import the key(s),
588588
// but fail the rescan with a generic error.
589-
throw JSONRPCError(RPC_WALLET_ERROR, "Importing wallets is disabled in pruned mode");
589+
throw JSONRPCError(RPC_WALLET_ERROR, "Importing wallets is disabled when blocks are pruned");
590590
}
591591

592592
WalletRescanReserver reserver(pwallet);

0 commit comments

Comments
 (0)