From f885b670290d39e697995fd2d35dc36edc104011 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Mon, 27 Mar 2017 16:12:02 +0200 Subject: refactor: Make rest.cpp dependency on `*toJSON` in `blockchain.cpp` explicit --- src/rpc/blockchain.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/rpc/blockchain.h') diff --git a/src/rpc/blockchain.h b/src/rpc/blockchain.h index 8821f297f6..c021441b0a 100644 --- a/src/rpc/blockchain.h +++ b/src/rpc/blockchain.h @@ -5,7 +5,12 @@ #ifndef BITCOIN_RPC_BLOCKCHAIN_H #define BITCOIN_RPC_BLOCKCHAIN_H +class CBlock; class CBlockIndex; +class CScript; +class CTransaction; +class uint256; +class UniValue; /** * Get the difficulty of the net wrt to the given block index, or the chain tip if @@ -19,5 +24,17 @@ double GetDifficulty(const CBlockIndex* blockindex = nullptr); /** Callback for when block tip changed. */ void RPCNotifyBlockChange(bool ibd, const CBlockIndex *); +/** Block description to JSON */ +UniValue blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool txDetails = false); + +/** Mempool information to JSON */ +UniValue mempoolInfoToJSON(); + +/** Mempool to JSON */ +UniValue mempoolToJSON(bool fVerbose = false); + +/** Block header to JSON */ +UniValue blockheaderToJSON(const CBlockIndex* blockindex); + #endif -- cgit v1.2.3