Skip to content

Commit 42ea47d

Browse files
meshcolliderMarcoFalke
authored andcommitted
Add wallet backup text to import*, add* and dumpwallet RPCs
Github-Pull: #11289 Rebased-From: a38bfbc
1 parent 3a6cdd4 commit 42ea47d

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
@@ -80,7 +80,7 @@ UniValue importprivkey(const JSONRPCRequest& request)
8080
if (request.fHelp || request.params.size() < 1 || request.params.size() > 3)
8181
throw std::runtime_error(
8282
"importprivkey \"privkey\" ( \"label\" ) ( rescan )\n"
83-
"\nAdds a private key (as returned by dumpprivkey) to your wallet.\n"
83+
"\nAdds a private key (as returned by dumpprivkey) to your wallet. Requires a new wallet backup.\n"
8484
"\nArguments:\n"
8585
"1. \"privkey\" (string, required) The private key (see dumpprivkey)\n"
8686
"2. \"label\" (string, optional, default=\"\") An optional label\n"
@@ -224,7 +224,7 @@ UniValue importaddress(const JSONRPCRequest& request)
224224
if (request.fHelp || request.params.size() < 1 || request.params.size() > 4)
225225
throw std::runtime_error(
226226
"importaddress \"address\" ( \"label\" rescan p2sh )\n"
227-
"\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"
227+
"\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"
228228
"\nArguments:\n"
229229
"1. \"script\" (string, required) The hex-encoded script (or address)\n"
230230
"2. \"label\" (string, optional, default=\"\") An optional label\n"
@@ -393,7 +393,7 @@ UniValue importpubkey(const JSONRPCRequest& request)
393393
if (request.fHelp || request.params.size() < 1 || request.params.size() > 4)
394394
throw std::runtime_error(
395395
"importpubkey \"pubkey\" ( \"label\" rescan )\n"
396-
"\nAdds a public key (in hex) that can be watched as if it were in your wallet but cannot be used to spend.\n"
396+
"\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"
397397
"\nArguments:\n"
398398
"1. \"pubkey\" (string, required) The hex-encoded public key\n"
399399
"2. \"label\" (string, optional, default=\"\") An optional label\n"
@@ -453,7 +453,7 @@ UniValue importwallet(const JSONRPCRequest& request)
453453
if (request.fHelp || request.params.size() != 1)
454454
throw std::runtime_error(
455455
"importwallet \"filename\"\n"
456-
"\nImports keys from a wallet dump file (see dumpwallet).\n"
456+
"\nImports keys from a wallet dump file (see dumpwallet). Requires a new wallet backup to include imported keys.\n"
457457
"\nArguments:\n"
458458
"1. \"filename\" (string, required) The wallet file\n"
459459
"\nExamples:\n"
@@ -596,6 +596,7 @@ UniValue dumpwallet(const JSONRPCRequest& request)
596596
throw std::runtime_error(
597597
"dumpwallet \"filename\"\n"
598598
"\nDumps all wallet keys in a human-readable format to a server-side file. This does not allow overwriting existing files.\n"
599+
"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"
599600
"\nArguments:\n"
600601
"1. \"filename\" (string, required) The filename with path (either absolute or relative to bitcoind)\n"
601602
"\nResult:\n"
@@ -1038,7 +1039,7 @@ UniValue importmulti(const JSONRPCRequest& mainRequest)
10381039
if (mainRequest.fHelp || mainRequest.params.size() < 1 || mainRequest.params.size() > 2)
10391040
throw std::runtime_error(
10401041
"importmulti \"requests\" ( \"options\" )\n\n"
1041-
"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"
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). Requires a new wallet backup.\n\n"
10421043
"Arguments:\n"
10431044
"1. requests (array, required) Data to be imported\n"
10441045
" [ (array of json objects)\n"

src/wallet/rpcwallet.cpp

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

@@ -1182,7 +1182,7 @@ UniValue addwitnessaddress(const JSONRPCRequest& request)
11821182
if (request.fHelp || request.params.size() < 1 || request.params.size() > 1)
11831183
{
11841184
std::string msg = "addwitnessaddress \"address\"\n"
1185-
"\nAdd a witness address for a script (with pubkey or redeemscript known).\n"
1185+
"\nAdd a witness address for a script (with pubkey or redeemscript known). Requires a new wallet backup.\n"
11861186
"It returns the witness script.\n"
11871187

11881188
"\nArguments:\n"

0 commit comments

Comments
 (0)