Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/blockchain.h
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | |||||
/** Mempool to JSON */ | /** Mempool to JSON */ | ||||
UniValue MempoolToJSON(const CTxMemPool &pool, bool verbose = false); | UniValue MempoolToJSON(const CTxMemPool &pool, bool verbose = false); | ||||
/** Block header to JSON */ | /** Block header to JSON */ | ||||
UniValue blockheaderToJSON(const CBlockIndex *tip, | 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 | |||||
//! RPC methods. Due to limitations of the RPC framework, there's currently no | |||||
//! direct way to pass in state to RPC methods without globals. | |||||
extern NodeContext *g_rpc_node; | |||||
NodeContext &EnsureNodeContext(const util::Ref &context); | NodeContext &EnsureNodeContext(const util::Ref &context); | ||||
CTxMemPool &EnsureMemPool(const util::Ref &context); | CTxMemPool &EnsureMemPool(const util::Ref &context); | ||||
#endif // BITCOIN_RPC_BLOCKCHAIN_H | #endif // BITCOIN_RPC_BLOCKCHAIN_H |