@@ -2179,7 +2179,7 @@ UniValue walletpassphrase(const JSONRPCRequest& request)
2179
2179
return NullUniValue;
2180
2180
}
2181
2181
2182
- if (pwallet-> IsCrypted () && ( request.fHelp || request.params .size () != 2 ) ) {
2182
+ if (request.fHelp || request.params .size () != 2 ) {
2183
2183
throw std::runtime_error (
2184
2184
" walletpassphrase \" passphrase\" timeout\n "
2185
2185
" \n Stores the wallet decryption key in memory for 'timeout' seconds.\n "
@@ -2243,7 +2243,7 @@ UniValue walletpassphrasechange(const JSONRPCRequest& request)
2243
2243
return NullUniValue;
2244
2244
}
2245
2245
2246
- if (pwallet-> IsCrypted () && ( request.fHelp || request.params .size () != 2 ) ) {
2246
+ if (request.fHelp || request.params .size () != 2 ) {
2247
2247
throw std::runtime_error (
2248
2248
" walletpassphrasechange \" oldpassphrase\" \" newpassphrase\"\n "
2249
2249
" \n Changes the wallet passphrase from 'oldpassphrase' to 'newpassphrase'.\n "
@@ -2294,7 +2294,7 @@ UniValue walletlock(const JSONRPCRequest& request)
2294
2294
return NullUniValue;
2295
2295
}
2296
2296
2297
- if (pwallet-> IsCrypted () && ( request.fHelp || request.params .size () != 0 ) ) {
2297
+ if (request.fHelp || request.params .size () != 0 ) {
2298
2298
throw std::runtime_error (
2299
2299
" walletlock\n "
2300
2300
" \n Removes the wallet encryption key from memory, locking the wallet.\n "
@@ -2334,7 +2334,7 @@ UniValue encryptwallet(const JSONRPCRequest& request)
2334
2334
return NullUniValue;
2335
2335
}
2336
2336
2337
- if (!pwallet-> IsCrypted () && ( request.fHelp || request.params .size () != 1 ) ) {
2337
+ if (request.fHelp || request.params .size () != 1 ) {
2338
2338
throw std::runtime_error (
2339
2339
" encryptwallet \" passphrase\"\n "
2340
2340
" \n Encrypts the wallet with 'passphrase'. This is for first time encryption.\n "
0 commit comments