diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-06-10 12:30:17 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-06-10 12:32:31 +0200 |
commit | ac5476e2c11617a8d9db9ffe405e3980fa19f983 (patch) | |
tree | 33a318aae646496da403506f8e434f606409078e /src/wallet | |
parent | 3a1d3e8f52e98af5c527aafc3d494db258c2bb46 (diff) | |
parent | 7e6569ea5be8cb26454ede3efb6a50b393aaa9be (diff) |
Merge pull request #6057
7e6569e [squashme] improve/corrects prune mode detection test for required wallet rescans (Jonas Schnelli)
7a12119 [RPC] disable import functions in pruned mode (Jonas Schnelli)
3201035 [autoprune] allow wallet in pruned mode (Jonas Schnelli)
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/rpcdump.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp index b682a42e23..5f800474a0 100644 --- a/src/wallet/rpcdump.cpp +++ b/src/wallet/rpcdump.cpp @@ -94,6 +94,9 @@ UniValue importprivkey(const UniValue& params, bool fHelp) + HelpExampleRpc("importprivkey", "\"mykey\", \"testing\", false") ); + if (fPruneMode) + throw JSONRPCError(RPC_WALLET_ERROR, "Importing keys is disabled in pruned mode"); + LOCK2(cs_main, pwalletMain->cs_wallet); EnsureWalletIsUnlocked(); @@ -166,6 +169,9 @@ UniValue importaddress(const UniValue& params, bool fHelp) + HelpExampleRpc("importaddress", "\"myaddress\", \"testing\", false") ); + if (fPruneMode) + throw JSONRPCError(RPC_WALLET_ERROR, "Importing addresses is disabled in pruned mode"); + LOCK2(cs_main, pwalletMain->cs_wallet); CScript script; @@ -236,6 +242,9 @@ UniValue importwallet(const UniValue& params, bool fHelp) + HelpExampleRpc("importwallet", "\"test\"") ); + if (fPruneMode) + throw JSONRPCError(RPC_WALLET_ERROR, "Importing wallets is disabled in pruned mode"); + LOCK2(cs_main, pwalletMain->cs_wallet); EnsureWalletIsUnlocked(); |