Changeset View
Changeset View
Standalone View
Standalone View
src/coins.h
Show First 20 Lines • Show All 288 Lines • ▼ Show 20 Lines | public: | ||||
//! Check whether all prevouts of the transaction are present in the UTXO | //! Check whether all prevouts of the transaction are present in the UTXO | ||||
//! set represented by this view | //! set represented by this view | ||||
bool HaveInputs(const CTransaction &tx) const; | bool HaveInputs(const CTransaction &tx) const; | ||||
const CTxOut &GetOutputFor(const CTxIn &input) const; | const CTxOut &GetOutputFor(const CTxIn &input) const; | ||||
private: | private: | ||||
/** | |||||
* @note this is marked const, but may actually append to `cacheCoins`, | |||||
* increasing memory usage. | |||||
*/ | |||||
CCoinsMap::iterator FetchCoin(const COutPoint &outpoint) const; | CCoinsMap::iterator FetchCoin(const COutPoint &outpoint) const; | ||||
}; | }; | ||||
//! Utility function to add all of a transaction's outputs to a cache. | //! Utility function to add all of a transaction's outputs to a cache. | ||||
//! When check is false, this assumes that overwrites are only possible for | //! When check is false, this assumes that overwrites are only possible for | ||||
//! coinbase transactions. When check is true, the underlying view may be | //! coinbase transactions. When check is true, the underlying view may be | ||||
//! queried to determine whether an addition is an overwrite. | //! queried to determine whether an addition is an overwrite. | ||||
// TODO: pass in a boolean to limit these possible overwrites to known | // TODO: pass in a boolean to limit these possible overwrites to known | ||||
Show All 37 Lines |