|
|
|
@ -157,7 +157,7 @@ UniValue importprivkey(const JSONRPCRequest& request)
|
|
|
|
|
if (!request.params[2].isNull())
|
|
|
|
|
fRescan = request.params[2].get_bool();
|
|
|
|
|
|
|
|
|
|
if (fRescan && fPruneMode)
|
|
|
|
|
if (fRescan && pwallet->chain().getPruneMode())
|
|
|
|
|
throw JSONRPCError(RPC_WALLET_ERROR, "Rescan is disabled in pruned mode");
|
|
|
|
|
|
|
|
|
|
if (fRescan && !reserver.reserve()) {
|
|
|
|
@ -313,7 +313,7 @@ UniValue importaddress(const JSONRPCRequest& request)
|
|
|
|
|
if (!request.params[2].isNull())
|
|
|
|
|
fRescan = request.params[2].get_bool();
|
|
|
|
|
|
|
|
|
|
if (fRescan && fPruneMode)
|
|
|
|
|
if (fRescan && pwallet->chain().getPruneMode())
|
|
|
|
|
throw JSONRPCError(RPC_WALLET_ERROR, "Rescan is disabled in pruned mode");
|
|
|
|
|
|
|
|
|
|
WalletRescanReserver reserver(pwallet);
|
|
|
|
@ -501,7 +501,7 @@ UniValue importpubkey(const JSONRPCRequest& request)
|
|
|
|
|
if (!request.params[2].isNull())
|
|
|
|
|
fRescan = request.params[2].get_bool();
|
|
|
|
|
|
|
|
|
|
if (fRescan && fPruneMode)
|
|
|
|
|
if (fRescan && pwallet->chain().getPruneMode())
|
|
|
|
|
throw JSONRPCError(RPC_WALLET_ERROR, "Rescan is disabled in pruned mode");
|
|
|
|
|
|
|
|
|
|
WalletRescanReserver reserver(pwallet);
|
|
|
|
@ -562,7 +562,7 @@ UniValue importwallet(const JSONRPCRequest& request)
|
|
|
|
|
},
|
|
|
|
|
}.ToString());
|
|
|
|
|
|
|
|
|
|
if (fPruneMode)
|
|
|
|
|
if (pwallet->chain().getPruneMode())
|
|
|
|
|
throw JSONRPCError(RPC_WALLET_ERROR, "Importing wallets is disabled in pruned mode");
|
|
|
|
|
|
|
|
|
|
WalletRescanReserver reserver(pwallet);
|
|
|
|
|