Move wallet RPC declarations to rpcwallet.h
This commit is contained in:
parent
ad1573472e
commit
a4356328e0
5 changed files with 20 additions and 11 deletions
|
@ -14,6 +14,7 @@
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "utilstrencodings.h"
|
#include "utilstrencodings.h"
|
||||||
#ifdef ENABLE_WALLET
|
#ifdef ENABLE_WALLET
|
||||||
|
#include "wallet/rpcwallet.h"
|
||||||
#include "wallet/wallet.h"
|
#include "wallet/wallet.h"
|
||||||
#include "wallet/walletdb.h"
|
#include "wallet/walletdb.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -234,6 +235,9 @@ UniValue validateaddress(const JSONRPCRequest& request)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Needed even with !ENABLE_WALLET, to pass (ignored) pointers around
|
||||||
|
class CWallet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used by addmultisigaddress / createmultisig:
|
* Used by addmultisigaddress / createmultisig:
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#include "uint256.h"
|
#include "uint256.h"
|
||||||
#include "utilstrencodings.h"
|
#include "utilstrencodings.h"
|
||||||
#ifdef ENABLE_WALLET
|
#ifdef ENABLE_WALLET
|
||||||
|
#include "wallet/rpcwallet.h"
|
||||||
#include "wallet/wallet.h"
|
#include "wallet/wallet.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -196,17 +196,6 @@ extern double GetDifficulty(const CBlockIndex* blockindex = NULL);
|
||||||
extern std::string HelpExampleCli(const std::string& methodname, const std::string& args);
|
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 std::string HelpExampleRpc(const std::string& methodname, const std::string& args);
|
||||||
|
|
||||||
// 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
|
|
||||||
CWallet *GetWalletForJSONRPCRequest(const JSONRPCRequest&);
|
|
||||||
std::string HelpRequiringPassphrase(CWallet *);
|
|
||||||
void EnsureWalletIsUnlocked(CWallet *);
|
|
||||||
bool EnsureWalletIsAvailable(CWallet *, bool avoidException);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool StartRPC();
|
bool StartRPC();
|
||||||
void InterruptRPC();
|
void InterruptRPC();
|
||||||
void StopRPC();
|
void StopRPC();
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
#include "merkleblock.h"
|
#include "merkleblock.h"
|
||||||
#include "core_io.h"
|
#include "core_io.h"
|
||||||
|
|
||||||
|
#include "rpcwallet.h"
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,20 @@
|
||||||
#define BITCOIN_WALLET_RPCWALLET_H
|
#define BITCOIN_WALLET_RPCWALLET_H
|
||||||
|
|
||||||
class CRPCTable;
|
class CRPCTable;
|
||||||
|
class JSONRPCRequest;
|
||||||
|
|
||||||
void RegisterWalletRPCCommands(CRPCTable &t);
|
void RegisterWalletRPCCommands(CRPCTable &t);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Figures out what wallet, if any, to use for a JSONRPCRequest.
|
||||||
|
*
|
||||||
|
* @param[in] request JSONRPCRequest that wishes to access a wallet
|
||||||
|
* @return NULL if no wallet should be used, or a pointer to the CWallet
|
||||||
|
*/
|
||||||
|
CWallet *GetWalletForJSONRPCRequest(const JSONRPCRequest&);
|
||||||
|
|
||||||
|
std::string HelpRequiringPassphrase(CWallet *);
|
||||||
|
void EnsureWalletIsUnlocked(CWallet *);
|
||||||
|
bool EnsureWalletIsAvailable(CWallet *, bool avoidException);
|
||||||
|
|
||||||
#endif //BITCOIN_WALLET_RPCWALLET_H
|
#endif //BITCOIN_WALLET_RPCWALLET_H
|
||||||
|
|
Loading…
Reference in a new issue