diff options
| author | Luke Dashjr <[email protected]> | 2016-09-09 05:32:12 +0000 |
|---|---|---|
| committer | Luke Dashjr <[email protected]> | 2017-02-27 20:45:17 +0000 |
| commit | eca550f2501f3f2bbe682bdc3cb8b90c90c90275 (patch) | |
| tree | 8c6f62693149cdb3a901f3ee86873ac9e9851e25 /src/rpc/server.h | |
| parent | Merge #9875: tests: Fix dangling pwalletMain pointer in wallet tests (diff) | |
| download | discoin-eca550f2501f3f2bbe682bdc3cb8b90c90c90275.tar.xz discoin-eca550f2501f3f2bbe682bdc3cb8b90c90c90275.zip | |
RPC/Wallet: Pass CWallet as pointer to helper functions
Diffstat (limited to 'src/rpc/server.h')
| -rw-r--r-- | src/rpc/server.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/rpc/server.h b/src/rpc/server.h index 52f82866d..b32eaaa13 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(); |