Raven Core  3.0.0
P2P Digital Currency
blockchain.h
Go to the documentation of this file.
1 // Copyright (c) 2017 The Bitcoin Core developers
2 // Copyright (c) 2017-2019 The Raven Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
6 #ifndef RAVEN_RPC_BLOCKCHAIN_H
7 #define RAVEN_RPC_BLOCKCHAIN_H
8 
9 class CBlock;
10 class CBlockIndex;
11 class UniValue;
12 
20 double GetDifficulty(const CBlockIndex* blockindex = nullptr);
21 
23 void RPCNotifyBlockChange(bool ibd, const CBlockIndex *);
24 
26 UniValue blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool txDetails = false);
27 
30 
32 UniValue mempoolToJSON(bool fVerbose = false);
33 
35 UniValue blockheaderToJSON(const CBlockIndex* blockindex);
36 
37 #endif
38 
Definition: block.h:73
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:56
void RPCNotifyBlockChange(bool ibd, const CBlockIndex *)
Callback for when block tip changed.
Definition: blockchain.cpp:297
UniValue mempoolInfoToJSON()
Mempool information to JSON.
UniValue mempoolToJSON(bool fVerbose=false)
Mempool to JSON.
Definition: blockchain.cpp:498
The block chain is a tree shaped structure starting with the genesis block at the root...
Definition: chain.h:172
UniValue blockheaderToJSON(const CBlockIndex *blockindex)
Block header to JSON.
Definition: blockchain.cpp:85
UniValue blockToJSON(const CBlock &block, const CBlockIndex *blockindex, bool txDetails=false)
Block description to JSON.
Definition: blockchain.cpp:219