Changeset View
Changeset View
Standalone View
Standalone View
src/interfaces/chain.h
Show First 20 Lines • Show All 173 Lines • ▼ Show 20 Lines | public: | ||||
//! unlocked when the returned interface is freed. | //! unlocked when the returned interface is freed. | ||||
virtual std::unique_ptr<Lock> lock(bool try_lock = false) = 0; | virtual std::unique_ptr<Lock> lock(bool try_lock = false) = 0; | ||||
//! Return whether node has the block and optionally return block metadata | //! Return whether node has the block and optionally return block metadata | ||||
//! or contents. | //! or contents. | ||||
virtual bool findBlock(const BlockHash &hash, | virtual bool findBlock(const BlockHash &hash, | ||||
const FoundBlock &block = {}) = 0; | const FoundBlock &block = {}) = 0; | ||||
//! Return whether block descends from a specified ancestor, and | |||||
//! optionally return ancestor information. | |||||
virtual bool findAncestorByHash(const BlockHash &block_hash, | |||||
const BlockHash &ancestor_hash, | |||||
const FoundBlock &ancestor_out = {}) = 0; | |||||
//! Look up unspent output information. Returns coins in the mempool and in | //! 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 | //! the current chain UTXO set. Iterates through all the keys in the map and | ||||
//! populates the values. | //! populates the values. | ||||
virtual void findCoins(std::map<COutPoint, Coin> &coins) = 0; | 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; | ||||
▲ Show 20 Lines • Show All 157 Lines • Show Last 20 Lines |