Changeset View
Changeset View
Standalone View
Standalone View
src/interfaces/chain.h
Show First 20 Lines • Show All 169 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; | ||||
//! Find first block in the chain with timestamp >= the given time | |||||
//! and height >= than the given height, return false if there is no block | |||||
//! with a high enough timestamp and height. Optionally return block | |||||
//! information. | |||||
virtual bool | |||||
findFirstBlockWithTimeAndHeight(int64_t min_time, int min_height, | |||||
const FoundBlock &block = {}) = 0; | |||||
//! Find ancestor of block at specified height and optionally return | //! Find ancestor of block at specified height and optionally return | ||||
//! ancestor information. | //! ancestor information. | ||||
virtual bool findAncestorByHeight(const BlockHash &block_hash, | virtual bool findAncestorByHeight(const BlockHash &block_hash, | ||||
int ancestor_height, | int ancestor_height, | ||||
const FoundBlock &ancestor_out = {}) = 0; | const FoundBlock &ancestor_out = {}) = 0; | ||||
//! Return whether block descends from a specified ancestor, and | //! Return whether block descends from a specified ancestor, and | ||||
//! optionally return ancestor information. | //! optionally return ancestor information. | ||||
▲ Show 20 Lines • Show All 177 Lines • Show Last 20 Lines |