mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 18:53:23 -03:00
Merge #11590: [Wallet] always show help-line of wallet encryption calls
720d9e8fa
[Wallet] always show help-line of wallet encryption calls (Jonas Schnelli)
Pull request description:
We do currently show/hide the wallet encryption RPC calls from the help if the current wallet.
In case of an encrypted wallet, `encryptwallet` is hidden and `walletpassphrasechange`, `walletpassphrasechange` and `walletlock` do appear in the help.
This is no longer ideal in case of multiwallet due to the fact that one may want help infos in order to target a specific wallet.
IMO its preferable to have a static help screen (show everything always). The currently show/hidden calls do handle the possible invalid encryption-state fine.
Fixes #11588
Tree-SHA512: 513fecd15248a31361f5143685e8cdeb63dfd3fa7120828917e1db54d936dc3db60d48ce46efa5c3a563a48157fe962689879856eeeed53f904686b12aec204e
This commit is contained in:
commit
bfb270acfa
1 changed files with 4 additions and 4 deletions
|
@ -2180,7 +2180,7 @@ UniValue walletpassphrase(const JSONRPCRequest& request)
|
|||
return NullUniValue;
|
||||
}
|
||||
|
||||
if (pwallet->IsCrypted() && (request.fHelp || request.params.size() != 2)) {
|
||||
if (request.fHelp || request.params.size() != 2) {
|
||||
throw std::runtime_error(
|
||||
"walletpassphrase \"passphrase\" timeout\n"
|
||||
"\nStores the wallet decryption key in memory for 'timeout' seconds.\n"
|
||||
|
@ -2244,7 +2244,7 @@ UniValue walletpassphrasechange(const JSONRPCRequest& request)
|
|||
return NullUniValue;
|
||||
}
|
||||
|
||||
if (pwallet->IsCrypted() && (request.fHelp || request.params.size() != 2)) {
|
||||
if (request.fHelp || request.params.size() != 2) {
|
||||
throw std::runtime_error(
|
||||
"walletpassphrasechange \"oldpassphrase\" \"newpassphrase\"\n"
|
||||
"\nChanges the wallet passphrase from 'oldpassphrase' to 'newpassphrase'.\n"
|
||||
|
@ -2295,7 +2295,7 @@ UniValue walletlock(const JSONRPCRequest& request)
|
|||
return NullUniValue;
|
||||
}
|
||||
|
||||
if (pwallet->IsCrypted() && (request.fHelp || request.params.size() != 0)) {
|
||||
if (request.fHelp || request.params.size() != 0) {
|
||||
throw std::runtime_error(
|
||||
"walletlock\n"
|
||||
"\nRemoves the wallet encryption key from memory, locking the wallet.\n"
|
||||
|
@ -2335,7 +2335,7 @@ UniValue encryptwallet(const JSONRPCRequest& request)
|
|||
return NullUniValue;
|
||||
}
|
||||
|
||||
if (!pwallet->IsCrypted() && (request.fHelp || request.params.size() != 1)) {
|
||||
if (request.fHelp || request.params.size() != 1) {
|
||||
throw std::runtime_error(
|
||||
"encryptwallet \"passphrase\"\n"
|
||||
"\nEncrypts the wallet with 'passphrase'. This is for first time encryption.\n"
|
||||
|
|
Loading…
Add table
Reference in a new issue