Browse Source
0.15f885b67
refactor: Make rest.cpp dependency on `*toJSON` in `blockchain.cpp` explicit (Wladimir J. van der Laan)8d8f28d
refactor: Move RPCNotifyBlockChange out of `rpc/server.h` (Wladimir J. van der Laan)e6dcfee
refactor: Move GetDifficulty out of `rpc/server.h` (Wladimir J. van der Laan) Tree-SHA512: fc2656611d18442f2fddba5ac1554d958151f6785c2039afdfc36735d7e71592d9686ff6cc7b2ad95180071d7514470e62c52d697c5a1e88f851bddaf5942edb
Wladimir J. van der Laan
8 years ago
8 changed files with 52 additions and 17 deletions
@ -0,0 +1,40 @@
@@ -0,0 +1,40 @@
|
||||
// Copyright (c) 2017 The Bitcoin Core developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#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 |
||||
* not provided. |
||||
* |
||||
* @return A floating point number that is a multiple of the main net minimum |
||||
* difficulty (4295032833 hashes). |
||||
*/ |
||||
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 |
||||
|
Loading…
Reference in new issue