aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/server.h
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2016-09-09 05:32:12 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2017-02-27 20:45:17 +0000
commiteca550f2501f3f2bbe682bdc3cb8b90c90c90275 (patch)
tree8c6f62693149cdb3a901f3ee86873ac9e9851e25 /src/rpc/server.h
parent94e5ba9ba2901c8205c1814ece8e2fafbff63a03 (diff)
RPC/Wallet: Pass CWallet as pointer to helper functions
Diffstat (limited to 'src/rpc/server.h')
-rw-r--r--src/rpc/server.h11
1 files changed, 9 insertions, 2 deletions
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();