Skip to content

Commit a38bfbc

Browse files
committed
Add wallet backup text to import*, add* and dumpwallet RPCs
1 parent 326a565 commit a38bfbc

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

src/wallet/rpcdump.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ UniValue importprivkey(const JSONRPCRequest& request)
8181
if (request.fHelp || request.params.size() < 1 || request.params.size() > 3)
8282
throw std::runtime_error(
8383
"importprivkey \"privkey\" ( \"label\" ) ( rescan )\n"
84-
"\nAdds a private key (as returned by dumpprivkey) to your wallet.\n"
84+
"\nAdds a private key (as returned by dumpprivkey) to your wallet. Requires a new wallet backup.\n"
8585
"\nArguments:\n"
8686
"1. \"privkey\" (string, required) The private key (see dumpprivkey)\n"
8787
"2. \"label\" (string, optional, default=\"\") An optional label\n"
@@ -226,7 +226,7 @@ UniValue importaddress(const JSONRPCRequest& request)
226226
if (request.fHelp || request.params.size() < 1 || request.params.size() > 4)
227227
throw std::runtime_error(
228228
"importaddress \"address\" ( \"label\" rescan p2sh )\n"
229-
"\nAdds a script (in hex) or address that can be watched as if it were in your wallet but cannot be used to spend.\n"
229+
"\nAdds a script (in hex) or address that can be watched as if it were in your wallet but cannot be used to spend. Requires a new wallet backup.\n"
230230
"\nArguments:\n"
231231
"1. \"script\" (string, required) The hex-encoded script (or address)\n"
232232
"2. \"label\" (string, optional, default=\"\") An optional label\n"
@@ -396,7 +396,7 @@ UniValue importpubkey(const JSONRPCRequest& request)
396396
if (request.fHelp || request.params.size() < 1 || request.params.size() > 4)
397397
throw std::runtime_error(
398398
"importpubkey \"pubkey\" ( \"label\" rescan )\n"
399-
"\nAdds a public key (in hex) that can be watched as if it were in your wallet but cannot be used to spend.\n"
399+
"\nAdds a public key (in hex) that can be watched as if it were in your wallet but cannot be used to spend. Requires a new wallet backup.\n"
400400
"\nArguments:\n"
401401
"1. \"pubkey\" (string, required) The hex-encoded public key\n"
402402
"2. \"label\" (string, optional, default=\"\") An optional label\n"
@@ -456,7 +456,7 @@ UniValue importwallet(const JSONRPCRequest& request)
456456
if (request.fHelp || request.params.size() != 1)
457457
throw std::runtime_error(
458458
"importwallet \"filename\"\n"
459-
"\nImports keys from a wallet dump file (see dumpwallet).\n"
459+
"\nImports keys from a wallet dump file (see dumpwallet). Requires a new wallet backup to include imported keys.\n"
460460
"\nArguments:\n"
461461
"1. \"filename\" (string, required) The wallet file\n"
462462
"\nExamples:\n"
@@ -601,6 +601,7 @@ UniValue dumpwallet(const JSONRPCRequest& request)
601601
throw std::runtime_error(
602602
"dumpwallet \"filename\"\n"
603603
"\nDumps all wallet keys in a human-readable format to a server-side file. This does not allow overwriting existing files.\n"
604+
"Note that if your wallet contains keys which are not derived from your HD seed (e.g. imported keys), these are not covered by only backing up the seed itself, and must be backed up too (e.g. ensure you back up the whole dumpfile).\n"
604605
"\nArguments:\n"
605606
"1. \"filename\" (string, required) The filename with path (either absolute or relative to bitcoind)\n"
606607
"\nResult:\n"
@@ -1039,7 +1040,7 @@ UniValue importmulti(const JSONRPCRequest& mainRequest)
10391040
if (mainRequest.fHelp || mainRequest.params.size() < 1 || mainRequest.params.size() > 2)
10401041
throw std::runtime_error(
10411042
"importmulti \"requests\" ( \"options\" )\n\n"
1042-
"Import addresses/scripts (with private or public keys, redeem script (P2SH)), rescanning all addresses in one-shot-only (rescan can be disabled via options).\n\n"
1043+
"Import addresses/scripts (with private or public keys, redeem script (P2SH)), rescanning all addresses in one-shot-only (rescan can be disabled via options). Requires a new wallet backup.\n\n"
10431044
"Arguments:\n"
10441045
"1. requests (array, required) Data to be imported\n"
10451046
" [ (array of json objects)\n"

src/wallet/rpcwallet.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,7 @@ UniValue addmultisigaddress(const JSONRPCRequest& request)
11101110
if (request.fHelp || request.params.size() < 2 || request.params.size() > 3)
11111111
{
11121112
std::string msg = "addmultisigaddress nrequired [\"key\",...] ( \"account\" )\n"
1113-
"\nAdd a nrequired-to-sign multisignature address to the wallet.\n"
1113+
"\nAdd a nrequired-to-sign multisignature address to the wallet. Requires a new wallet backup.\n"
11141114
"Each key is a Bitcoin address or hex-encoded public key.\n"
11151115
"If 'account' is specified (DEPRECATED), assign address to that account.\n"
11161116

@@ -1228,7 +1228,7 @@ UniValue addwitnessaddress(const JSONRPCRequest& request)
12281228
if (request.fHelp || request.params.size() < 1 || request.params.size() > 2)
12291229
{
12301230
std::string msg = "addwitnessaddress \"address\" ( p2sh )\n"
1231-
"\nAdd a witness address for a script (with pubkey or redeemscript known).\n"
1231+
"\nAdd a witness address for a script (with pubkey or redeemscript known). Requires a new wallet backup.\n"
12321232
"It returns the witness script.\n"
12331233

12341234
"\nArguments:\n"

0 commit comments

Comments
 (0)