diff options
Diffstat (limited to 'src/bitcoinrpc.h')
-rw-r--r-- | src/bitcoinrpc.h | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/src/bitcoinrpc.h b/src/bitcoinrpc.h index 62bc7b7238..46e3ba4f1d 100644 --- a/src/bitcoinrpc.h +++ b/src/bitcoinrpc.h @@ -6,18 +6,19 @@ #ifndef _BITCOINRPC_H_ #define _BITCOINRPC_H_ 1 -#include <string> +#include "uint256.h" + #include <list> #include <map> - -class CBlockIndex; -class CReserveKey; +#include <stdint.h> +#include <string> #include "json/json_spirit_reader_template.h" -#include "json/json_spirit_writer_template.h" #include "json/json_spirit_utils.h" +#include "json/json_spirit_writer_template.h" -#include "util.h" +class CBlockIndex; +class CReserveKey; // HTTP status codes enum HTTPStatusCode @@ -49,10 +50,13 @@ enum RPCErrorCode RPC_INVALID_PARAMETER = -8, // Invalid, missing or duplicate parameter RPC_DATABASE_ERROR = -20, // Database error RPC_DESERIALIZATION_ERROR = -22, // Error parsing or validating structure in raw format + RPC_SERVER_NOT_STARTED = -18, // RPC server was not started (StartRPCThreads() not called) // P2P client errors RPC_CLIENT_NOT_CONNECTED = -9, // Bitcoin is not connected RPC_CLIENT_IN_INITIAL_DOWNLOAD = -10, // Still downloading initial blocks + RPC_CLIENT_NODE_ALREADY_ADDED = -23, // Node is already added + RPC_CLIENT_NODE_NOT_ADDED = -24, // Node has not been added before // Wallet errors RPC_WALLET_ERROR = -4, // Unspecified problem with wallet (key not found etc.) @@ -93,7 +97,7 @@ void RPCTypeCheck(const json_spirit::Object& o, Run func nSeconds from now. Uses boost deadline timers. Overrides previous timer <name> (if any). */ -void RPCRunLater(const std::string& name, boost::function<void(void)> func, int64 nSeconds); +void RPCRunLater(const std::string& name, boost::function<void(void)> func, int64_t nSeconds); typedef json_spirit::Value(*rpcfn_type)(const json_spirit::Array& params, bool fHelp); @@ -143,9 +147,9 @@ extern std::vector<unsigned char> ParseHexO(const json_spirit::Object& o, std::s extern void InitRPCMining(); extern void ShutdownRPCMining(); -extern int64 nWalletUnlockTime; -extern int64 AmountFromValue(const json_spirit::Value& value); -extern json_spirit::Value ValueFromAmount(int64 amount); +extern int64_t nWalletUnlockTime; +extern int64_t AmountFromValue(const json_spirit::Value& value); +extern json_spirit::Value ValueFromAmount(int64_t amount); extern double GetDifficulty(const CBlockIndex* blockindex = NULL); extern std::string HexBits(unsigned int nBits); extern std::string HelpRequiringPassphrase(); @@ -153,8 +157,10 @@ extern void EnsureWalletIsUnlocked(); extern json_spirit::Value getconnectioncount(const json_spirit::Array& params, bool fHelp); // in rpcnet.cpp extern json_spirit::Value getpeerinfo(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value ping(const json_spirit::Array& params, bool fHelp); extern json_spirit::Value addnode(const json_spirit::Array& params, bool fHelp); extern json_spirit::Value getaddednodeinfo(const json_spirit::Array& params, bool fHelp); +extern json_spirit::Value getnettotals(const json_spirit::Array& params, bool fHelp); extern json_spirit::Value dumpprivkey(const json_spirit::Array& params, bool fHelp); // in rpcdump.cpp extern json_spirit::Value importprivkey(const json_spirit::Array& params, bool fHelp); |