Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/blockchain.h
Show All 9 Lines | |||||
#include <univalue.h> | #include <univalue.h> | ||||
class CBlock; | class CBlock; | ||||
class CBlockIndex; | class CBlockIndex; | ||||
class Config; | class Config; | ||||
class CTxMemPool; | class CTxMemPool; | ||||
class JSONRPCRequest; | class JSONRPCRequest; | ||||
struct NodeContext; | struct NodeContext; | ||||
namespace util { | |||||
class Ref; | |||||
} // namespace util | |||||
extern RecursiveMutex cs_main; | extern RecursiveMutex cs_main; | ||||
UniValue getblockchaininfo(const Config &config, const JSONRPCRequest &request); | UniValue getblockchaininfo(const Config &config, const JSONRPCRequest &request); | ||||
/** | /** | ||||
* Get the required difficulty of the next block w/r/t the given block index. | * Get the required difficulty of the next block w/r/t the given block index. | ||||
* | * | ||||
Show All 21 Lines | UniValue blockheaderToJSON(const CBlockIndex *tip, | ||||
const CBlockIndex *blockindex) | const CBlockIndex *blockindex) | ||||
LOCKS_EXCLUDED(cs_main); | LOCKS_EXCLUDED(cs_main); | ||||
//! Pointer to node state that needs to be declared as a global to be accessible | //! Pointer to node state that needs to be declared as a global to be accessible | ||||
//! RPC methods. Due to limitations of the RPC framework, there's currently no | //! RPC methods. Due to limitations of the RPC framework, there's currently no | ||||
//! direct way to pass in state to RPC methods without globals. | //! direct way to pass in state to RPC methods without globals. | ||||
extern NodeContext *g_rpc_node; | extern NodeContext *g_rpc_node; | ||||
CTxMemPool &EnsureMemPool(); | NodeContext &EnsureNodeContext(const util::Ref &context); | ||||
CTxMemPool &EnsureMemPool(const util::Ref &context); | |||||
#endif // BITCOIN_RPC_BLOCKCHAIN_H | #endif // BITCOIN_RPC_BLOCKCHAIN_H |