mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-02 13:28:09 +01:00
[Wallet] always show help-line of wallet encryption calls
Github-Pull: #11590
Rebased-From: 720d9e8fa1
This commit is contained in:
committed by
MarcoFalke
parent
8195cb0d7f
commit
6372a75581
@@ -2106,7 +2106,7 @@ UniValue walletpassphrase(const JSONRPCRequest& request)
|
|||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pwallet->IsCrypted() && (request.fHelp || request.params.size() != 2)) {
|
if (request.fHelp || request.params.size() != 2) {
|
||||||
throw std::runtime_error(
|
throw std::runtime_error(
|
||||||
"walletpassphrase \"passphrase\" timeout\n"
|
"walletpassphrase \"passphrase\" timeout\n"
|
||||||
"\nStores the wallet decryption key in memory for 'timeout' seconds.\n"
|
"\nStores the wallet decryption key in memory for 'timeout' seconds.\n"
|
||||||
@@ -2170,7 +2170,7 @@ UniValue walletpassphrasechange(const JSONRPCRequest& request)
|
|||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pwallet->IsCrypted() && (request.fHelp || request.params.size() != 2)) {
|
if (request.fHelp || request.params.size() != 2) {
|
||||||
throw std::runtime_error(
|
throw std::runtime_error(
|
||||||
"walletpassphrasechange \"oldpassphrase\" \"newpassphrase\"\n"
|
"walletpassphrasechange \"oldpassphrase\" \"newpassphrase\"\n"
|
||||||
"\nChanges the wallet passphrase from 'oldpassphrase' to 'newpassphrase'.\n"
|
"\nChanges the wallet passphrase from 'oldpassphrase' to 'newpassphrase'.\n"
|
||||||
@@ -2221,7 +2221,7 @@ UniValue walletlock(const JSONRPCRequest& request)
|
|||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pwallet->IsCrypted() && (request.fHelp || request.params.size() != 0)) {
|
if (request.fHelp || request.params.size() != 0) {
|
||||||
throw std::runtime_error(
|
throw std::runtime_error(
|
||||||
"walletlock\n"
|
"walletlock\n"
|
||||||
"\nRemoves the wallet encryption key from memory, locking the wallet.\n"
|
"\nRemoves the wallet encryption key from memory, locking the wallet.\n"
|
||||||
@@ -2261,7 +2261,7 @@ UniValue encryptwallet(const JSONRPCRequest& request)
|
|||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pwallet->IsCrypted() && (request.fHelp || request.params.size() != 1)) {
|
if (request.fHelp || request.params.size() != 1) {
|
||||||
throw std::runtime_error(
|
throw std::runtime_error(
|
||||||
"encryptwallet \"passphrase\"\n"
|
"encryptwallet \"passphrase\"\n"
|
||||||
"\nEncrypts the wallet with 'passphrase'. This is for first time encryption.\n"
|
"\nEncrypts the wallet with 'passphrase'. This is for first time encryption.\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user