Fabcoin Core  0.16.2
P2P Digital Currency
blockchain.h
Go to the documentation of this file.
1 // Copyright (c) 2017 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef FABCOIN_RPC_BLOCKCHAIN_H
6 #define FABCOIN_RPC_BLOCKCHAIN_H
7 
8 class CBlock;
9 class CBlockIndex;
10 class UniValue;
11 
19 double GetDifficulty(const CBlockIndex* blockindex = nullptr);
20 
22 void RPCNotifyBlockChange(bool ibd, const CBlockIndex *);
23 
25 UniValue blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool txDetails = false);
26 
29 
31 UniValue mempoolToJSON(bool fVerbose = false);
32 
34 UniValue blockheaderToJSON(const CBlockIndex* blockindex );
35 
36 #endif
37 
Definition: block.h:155
double GetDifficulty(const CBlockIndex *blockindex=nullptr)
Get the difficulty of the net wrt to the given block index, or the chain tip if not provided...
Definition: blockchain.cpp:105
void RPCNotifyBlockChange(bool ibd, const CBlockIndex *)
Callback for when block tip changed.
Definition: blockchain.cpp:308
UniValue mempoolInfoToJSON()
Mempool information to JSON.
UniValue mempoolToJSON(bool fVerbose=false)
Mempool to JSON.
Definition: blockchain.cpp:507
The block chain is a tree shaped structure starting with the genesis block at the root...
Definition: chain.h:177
UniValue blockheaderToJSON(const CBlockIndex *blockindex)
Block header to JSON.
Definition: blockchain.cpp:125
UniValue blockToJSON(const CBlock &block, const CBlockIndex *blockindex, bool txDetails=false)
Block description to JSON.
Definition: blockchain.cpp:175