diff options
author | MarcoFalke <falke.marco@gmail.com> | 2019-05-02 10:10:28 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2019-05-02 10:09:48 -0400 |
commit | fad13e925e197163a942f3f0d1ba2c95a2b65a56 (patch) | |
tree | dee3ceffde19ddb6aef59ec312a96dad00e36756 /src/wallet/rpcwallet.cpp | |
parent | fad40ec9151248c6e8225e14980424f581d23e02 (diff) | |
download | bitcoin-fad13e925e197163a942f3f0d1ba2c95a2b65a56.tar.xz |
rpcwallet: Make helper methods const on CWallet
Diffstat (limited to 'src/wallet/rpcwallet.cpp')
-rw-r--r-- | src/wallet/rpcwallet.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 336b3c73b3..02da2a7114 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -70,14 +70,14 @@ std::shared_ptr<CWallet> GetWalletForJSONRPCRequest(const JSONRPCRequest& reques return wallets.size() == 1 || (request.fHelp && wallets.size() > 0) ? wallets[0] : nullptr; } -std::string HelpRequiringPassphrase(CWallet * const pwallet) +std::string HelpRequiringPassphrase(const CWallet* pwallet) { return pwallet && pwallet->IsCrypted() ? "\nRequires wallet passphrase to be set with walletpassphrase call." : ""; } -bool EnsureWalletIsAvailable(CWallet * const pwallet, bool avoidException) +bool EnsureWalletIsAvailable(const CWallet* pwallet, bool avoidException) { if (pwallet) return true; if (avoidException) return false; @@ -89,7 +89,7 @@ bool EnsureWalletIsAvailable(CWallet * const pwallet, bool avoidException) "Wallet file not specified (must request wallet RPC through /wallet/<filename> uri-path)."); } -void EnsureWalletIsUnlocked(CWallet * const pwallet) +void EnsureWalletIsUnlocked(const CWallet* pwallet) { if (pwallet->IsLocked()) { throw JSONRPCError(RPC_WALLET_UNLOCK_NEEDED, "Error: Please enter the wallet passphrase with walletpassphrase first."); |