Changeset View
Changeset View
Standalone View
Standalone View
src/coins.h
Show First 20 Lines • Show All 132 Lines • ▼ Show 20 Lines | |||||
private: | private: | ||||
uint256 hashBlock; | uint256 hashBlock; | ||||
}; | }; | ||||
/** Abstract view on the open txout dataset. */ | /** Abstract view on the open txout dataset. */ | ||||
class CCoinsView { | class CCoinsView { | ||||
public: | public: | ||||
//! Retrieve the Coin (unspent transaction output) for a given outpoint. | /** | ||||
* Retrieve the Coin (unspent transaction output) for a given outpoint. | |||||
* Returns true only when an unspent coin was found, which is returned in | |||||
* coin. When false is returned, coin's value is unspecified. | |||||
*/ | |||||
virtual bool GetCoin(const COutPoint &outpoint, Coin &coin) const; | virtual bool GetCoin(const COutPoint &outpoint, Coin &coin) const; | ||||
//! Just check whether we have data for a given outpoint. | //! Just check whether a given outpoint is unspent. | ||||
//! This may (but cannot always) return true for spent outputs. | |||||
virtual bool HaveCoin(const COutPoint &outpoint) const; | virtual bool HaveCoin(const COutPoint &outpoint) const; | ||||
//! Retrieve the block hash whose state this CCoinsView currently represents | //! Retrieve the block hash whose state this CCoinsView currently represents | ||||
virtual uint256 GetBestBlock() const; | virtual uint256 GetBestBlock() const; | ||||
//! Retrieve the range of blocks that may have been only partially written. | //! Retrieve the range of blocks that may have been only partially written. | ||||
//! If the database is in a consistent state, the result is the empty | //! If the database is in a consistent state, the result is the empty | ||||
//! vector. | //! vector. | ||||
▲ Show 20 Lines • Show All 163 Lines • Show Last 20 Lines |