aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2019-05-15 14:10:41 -0400
committerMarcoFalke <falke.marco@gmail.com>2019-05-15 14:09:28 -0400
commitfa7e311e169349bfcf1dab8b980724e8ddf4e749 (patch)
tree4322d0b5d8d1e694c82aeb701031e32c446be975
parentaaaa57c2aad3a6278559ae3db5d953c847c6ffcb (diff)
downloadbitcoin-fa7e311e169349bfcf1dab8b980724e8ddf4e749.tar.xz
[doc] rpcwallet: Only fail rescan when blocks have been pruned
-rw-r--r--doc/release-notes.md10
-rw-r--r--src/wallet/rpcdump.cpp2
2 files changed, 11 insertions, 1 deletions
diff --git a/doc/release-notes.md b/doc/release-notes.md
index 0de0f563b1..3355c4c127 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -88,6 +88,16 @@ Configuration
the selected network. This change takes only effect if the selected network
is not mainnet.
+Wallet
+------
+
+- When in pruned mode, a rescan that was triggered by an `importwallet`,
+ `importpubkey`, `importaddress`, or `importprivkey` RPC will only fail when
+ blocks have been pruned. Previously it would fail when `-prune` has been set.
+ This change allows to set `-prune` to a high value (e.g. the disk size) and
+ the calls to any of the import RPCs would fail when the first block is
+ pruned.
+
Credits
=======
diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp
index 495590e6f9..ccbf5a2fd7 100644
--- a/src/wallet/rpcdump.cpp
+++ b/src/wallet/rpcdump.cpp
@@ -586,7 +586,7 @@ UniValue importwallet(const JSONRPCRequest& request)
// Exit early and print an error.
// If a block is pruned after this check, we will import the key(s),
// but fail the rescan with a generic error.
- throw JSONRPCError(RPC_WALLET_ERROR, "Importing wallets is disabled in pruned mode");
+ throw JSONRPCError(RPC_WALLET_ERROR, "Importing wallets is disabled when blocks are pruned");
}
WalletRescanReserver reserver(pwallet);