Changeset View
Changeset View
Standalone View
Standalone View
src/interfaces/chain.h
Show All 13 Lines | |||||
#include <memory> | #include <memory> | ||||
#include <string> | #include <string> | ||||
#include <vector> | #include <vector> | ||||
struct BlockHash; | struct BlockHash; | ||||
class CBlock; | class CBlock; | ||||
struct CBlockLocator; | struct CBlockLocator; | ||||
class CChainParams; | class CChainParams; | ||||
class Coin; | |||||
class Config; | class Config; | ||||
class CRPCCommand; | class CRPCCommand; | ||||
class CScheduler; | class CScheduler; | ||||
class CValidationState; | class CValidationState; | ||||
namespace Consensus { | namespace Consensus { | ||||
struct Params; | struct Params; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 141 Lines • ▼ Show 20 Lines | public: | ||||
//! | //! | ||||
//! If a block pointer is provided to retrieve the block contents, and the | //! If a block pointer is provided to retrieve the block contents, and the | ||||
//! block exists but doesn't have data (for example due to pruning), the | //! block exists but doesn't have data (for example due to pruning), the | ||||
//! block will be empty and all fields set to null. | //! block will be empty and all fields set to null. | ||||
virtual bool findBlock(const BlockHash &hash, CBlock *block = nullptr, | virtual bool findBlock(const BlockHash &hash, CBlock *block = nullptr, | ||||
int64_t *time = nullptr, | int64_t *time = nullptr, | ||||
int64_t *max_time = nullptr) = 0; | int64_t *max_time = nullptr) = 0; | ||||
//! Look up unspent output information. Returns coins in the mempool and in | |||||
//! the current chain UTXO set. Iterates through all the keys in the map and | |||||
//! populates the values. | |||||
virtual void findCoins(std::map<COutPoint, Coin> &coins) = 0; | |||||
//! Estimate fraction of total transactions verified if blocks up to | //! Estimate fraction of total transactions verified if blocks up to | ||||
//! the specified block hash are verified. | //! the specified block hash are verified. | ||||
virtual double guessVerificationProgress(const BlockHash &block_hash) = 0; | virtual double guessVerificationProgress(const BlockHash &block_hash) = 0; | ||||
//! Check if transaction has descendants in mempool. | //! Check if transaction has descendants in mempool. | ||||
virtual bool hasDescendantsInMempool(const TxId &txid) = 0; | virtual bool hasDescendantsInMempool(const TxId &txid) = 0; | ||||
//! Calculate mempool ancestor and descendant counts for the given | //! Calculate mempool ancestor and descendant counts for the given | ||||
▲ Show 20 Lines • Show All 110 Lines • Show Last 20 Lines |