From eca550f2501f3f2bbe682bdc3cb8b90c90c90275 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Fri, 9 Sep 2016 05:32:12 +0000 Subject: RPC/Wallet: Pass CWallet as pointer to helper functions --- src/rpc/server.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/rpc/server.h') diff --git a/src/rpc/server.h b/src/rpc/server.h index 52f82866dc..b32eaaa133 100644 --- a/src/rpc/server.h +++ b/src/rpc/server.h @@ -194,11 +194,18 @@ extern int64_t nWalletUnlockTime; extern CAmount AmountFromValue(const UniValue& value); extern UniValue ValueFromAmount(const CAmount& amount); extern double GetDifficulty(const CBlockIndex* blockindex = NULL); -extern std::string HelpRequiringPassphrase(); extern std::string HelpExampleCli(const std::string& methodname, const std::string& args); extern std::string HelpExampleRpc(const std::string& methodname, const std::string& args); -extern void EnsureWalletIsUnlocked(); +// Needed even with !ENABLE_WALLET, to pass (ignored) pointers around +class CWallet; + +#ifdef ENABLE_WALLET +// New code should accessing the wallet should be under the ../wallet/ directory +std::string HelpRequiringPassphrase(CWallet *); +void EnsureWalletIsUnlocked(CWallet *); +bool EnsureWalletIsAvailable(CWallet *, bool avoidException); +#endif bool StartRPC(); void InterruptRPC(); -- cgit v1.2.3