Skip to content

Commit

Permalink
Add wallet backup text to import*, add* and dumpwallet RPCs
Browse files Browse the repository at this point in the history
  • Loading branch information
meshcollider authored and random-zebra committed Jun 2, 2021
1 parent dbda874 commit 3711c6a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
17 changes: 7 additions & 10 deletions src/wallet/rpcdump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,8 @@ UniValue importprivkey(const JSONRPCRequest& request)
if (request.fHelp || request.params.size() < 1 || request.params.size() > 4)
throw std::runtime_error(
"importprivkey \"privkey\" ( \"label\" rescan is_staking_address )\n"
"\nAdds a private key (as returned by dumpprivkey) to your wallet.\n" +
"\nAdds a private key (as returned by dumpprivkey) to your wallet. Requires a new wallet backup.\n" +
HelpRequiringPassphrase(pwallet) + "\n"

"\nArguments:\n"
"1. \"privkey\" (string, required) The private key (see dumpprivkey)\n"
"2. \"label\" (string, optional, default=\"\") An optional label\n"
Expand Down Expand Up @@ -215,8 +214,7 @@ UniValue importaddress(const JSONRPCRequest& request)
if (request.fHelp || request.params.size() < 1 || request.params.size() > 4)
throw std::runtime_error(
"importaddress \"script\" ( \"label\" rescan )\n"
"\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"

"\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"
"\nArguments:\n"
"1. \"script\" (string, required) hex-encoded script (or address)\n"
"2. \"label\" (string, optional, default=\"\") An optional label\n"
Expand Down Expand Up @@ -282,7 +280,7 @@ UniValue importpubkey(const JSONRPCRequest& request)
if (request.fHelp || request.params.size() < 1 || request.params.size() > 4)
throw std::runtime_error(
"importpubkey \"pubkey\" ( \"label\" rescan )\n"
"\nAdds a public key (in hex) that can be watched as if it were in your wallet but cannot be used to spend.\n"
"\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"
"\nArguments:\n"
"1. \"pubkey\" (string, required) The hex-encoded public key\n"
"2. \"label\" (string, optional, default=\"\") An optional label\n"
Expand Down Expand Up @@ -339,9 +337,8 @@ UniValue importwallet(const JSONRPCRequest& request)
if (request.fHelp || request.params.size() != 1)
throw std::runtime_error(
"importwallet \"filename\"\n"
"\nImports keys from a wallet dump file (see dumpwallet).\n" +
"\nImports keys from a wallet dump file (see dumpwallet). Requires a new wallet backup.\n" +
HelpRequiringPassphrase(pwallet) + "\n"

"\nArguments:\n"
"1. \"filename\" (string, required) The wallet file\n"

Expand Down Expand Up @@ -506,9 +503,9 @@ UniValue dumpwallet(const JSONRPCRequest& request)
if (request.fHelp || request.params.size() != 1)
throw std::runtime_error(
"dumpwallet \"filename\"\n"
"\nDumps all wallet keys in a human-readable format to a server-side file. This does not allow overwriting existing files.\n" +
"\nDumps all wallet keys in a human-readable format to a server-side file. This does not allow overwriting existing files.\n"
"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" +
HelpRequiringPassphrase(pwallet) + "\n"

"\nArguments:\n"
"1. \"filename\" (string, required) The filename\n"

Expand Down Expand Up @@ -967,7 +964,7 @@ UniValue importmulti(const JSONRPCRequest& mainRequest)
if (mainRequest.fHelp || mainRequest.params.size() < 1 || mainRequest.params.size() > 2)
throw std::runtime_error(
"importmulti \"requests\" ( \"options\" )\n"
"\nImport addresses/scripts (with private or public keys, redeem script (P2SH)), rescanning all addresses in one-shot-only (rescan can be disabled via options).\n" +
"\nImport 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" +
HelpRequiringPassphrase(pwallet) + "\n"

"\nArguments:\n"
Expand Down
2 changes: 1 addition & 1 deletion src/wallet/rpcwallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2408,7 +2408,7 @@ UniValue addmultisigaddress(const JSONRPCRequest& request)
if (request.fHelp || request.params.size() < 2 || request.params.size() > 3)
throw std::runtime_error(
"addmultisigaddress nrequired [\"key\",...] ( \"label\" )\n"
"\nAdd a nrequired-to-sign multisignature address to the wallet.\n"
"\nAdd a nrequired-to-sign multisignature address to the wallet. Requires a new wallet backup.\n"
"Each key is a PIVX address or hex-encoded public key.\n"
"If 'label' is specified, assign address to that label.\n"

Expand Down

0 comments on commit 3711c6a

Please sign in to comment.