Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/blockchain.h
// Copyright (c) 2017-2019 The Bitcoin developers | // Copyright (c) 2017-2019 The Bitcoin developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#ifndef BITCOIN_RPC_BLOCKCHAIN_H | #ifndef BITCOIN_RPC_BLOCKCHAIN_H | ||||
#define BITCOIN_RPC_BLOCKCHAIN_H | #define BITCOIN_RPC_BLOCKCHAIN_H | ||||
#include <sync.h> | #include <sync.h> | ||||
#include <univalue.h> | #include <univalue.h> | ||||
class CBlock; | class CBlock; | ||||
class CBlockIndex; | class CBlockIndex; | ||||
class ChainstateManager; | class ChainstateManager; | ||||
class Config; | |||||
class CTxMemPool; | class CTxMemPool; | ||||
class JSONRPCRequest; | class RPCHelpMan; | ||||
struct NodeContext; | struct NodeContext; | ||||
namespace util { | namespace util { | ||||
class Ref; | class Ref; | ||||
} // namespace util | } // namespace util | ||||
extern RecursiveMutex cs_main; | extern RecursiveMutex cs_main; | ||||
UniValue getblockchaininfo(const Config &config, const JSONRPCRequest &request); | RPCHelpMan getblockchaininfo(); | ||||
/** | /** | ||||
* Get the required difficulty of the next block w/r/t the given block index. | * Get the required difficulty of the next block w/r/t the given block index. | ||||
* | * | ||||
* @return A floating point number that is a multiple of the main net minimum | * @return A floating point number that is a multiple of the main net minimum | ||||
* difficulty (4295032833 hashes). | * difficulty (4295032833 hashes). | ||||
*/ | */ | ||||
double GetDifficulty(const CBlockIndex *blockindex); | double GetDifficulty(const CBlockIndex *blockindex); | ||||
Show All 25 Lines |