aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2017-07-28 22:45:01 -0400
committerRussell Yanofsky <russ@yanofsky.org>2019-02-22 15:43:02 -0400
commitcc3836e8f90894432db06d9de6b20eac53d93cbe (patch)
tree25b167f26fa6a1bc1123fec1e9e8b9d5e2968faa /src/wallet
parentcc02c796d3517931acc861b0f9bc50e36e1c95f9 (diff)
Remove uses of fPruneMode in wallet code
This commit does not change behavior.
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/rpcdump.cpp8
-rw-r--r--src/wallet/wallet.cpp2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp
index f38202a2b8..046a6567a5 100644
--- a/src/wallet/rpcdump.cpp
+++ b/src/wallet/rpcdump.cpp
@@ -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);
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 75681e2007..a0718309b9 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -4334,7 +4334,7 @@ std::shared_ptr<CWallet> CWallet::CreateWalletFromFile(interfaces::Chain& chain,
//We can't rescan beyond non-pruned blocks, stop and throw an error
//this might happen if a user uses an old wallet within a pruned node
// or if he ran -disablewallet for a longer time, then decided to re-enable
- if (fPruneMode)
+ if (chain.getPruneMode())
{
int block_height = *tip_height;
while (block_height > 0 && locked_chain->haveBlockOnDisk(block_height - 1) && rescan_height != block_height) {