Changeset View
Changeset View
Standalone View
Standalone View
src/interfaces/chain.h
Show First 20 Lines • Show All 156 Lines • ▼ Show 20 Lines | public: | ||||
CTransactionRef tx, Amount absurd_fee, | CTransactionRef tx, Amount absurd_fee, | ||||
CValidationState &state) = 0; | CValidationState &state) = 0; | ||||
}; | }; | ||||
//! Return Lock interface. Chain is locked when this is called, and | //! Return Lock interface. Chain is locked when this is called, and | ||||
//! 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 Lock interface assuming chain is already locked. This | |||||
//! method is temporary and is only used in a few places to avoid changing | |||||
//! behavior while code is transitioned to use the Chain::Lock interface. | |||||
virtual std::unique_ptr<Lock> assumeLocked() = 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. | ||||
//! | //! | ||||
//! 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, | ||||
▲ Show 20 Lines • Show All 144 Lines • Show Last 20 Lines |