mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-10 10:52:31 -05:00
[doc] rpcwallet: Only fail rescan when blocks have been pruned
This commit is contained in:
parent
aaaa57c2aa
commit
fa7e311e16
2 changed files with 11 additions and 1 deletions
|
@ -88,6 +88,16 @@ Configuration
|
||||||
the selected network. This change takes only effect if the selected network
|
the selected network. This change takes only effect if the selected network
|
||||||
is not mainnet.
|
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
|
Credits
|
||||||
=======
|
=======
|
||||||
|
|
||||||
|
|
|
@ -586,7 +586,7 @@ UniValue importwallet(const JSONRPCRequest& request)
|
||||||
// Exit early and print an error.
|
// Exit early and print an error.
|
||||||
// If a block is pruned after this check, we will import the key(s),
|
// If a block is pruned after this check, we will import the key(s),
|
||||||
// but fail the rescan with a generic error.
|
// 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);
|
WalletRescanReserver reserver(pwallet);
|
||||||
|
|
Loading…
Add table
Reference in a new issue