Changeset View
Changeset View
Standalone View
Standalone View
src/coins.h
Show First 20 Lines • Show All 285 Lines • ▼ Show 20 Lines | public: | ||||
* @return Sum of value of all inputs (scriptSigs) | * @return Sum of value of all inputs (scriptSigs) | ||||
*/ | */ | ||||
Amount GetValueIn(const CTransaction &tx) const; | Amount GetValueIn(const CTransaction &tx) const; | ||||
//! 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; | ||||
/** | |||||
* Return priority of tx at height nHeight. Also calculate the sum of the | |||||
* values of the inputs that are already in the chain. These are the inputs | |||||
* that will age and increase priority as new blocks are added to the chain. | |||||
*/ | |||||
double GetPriority(const CTransaction &tx, int nHeight, | |||||
Amount &inChainInputValue) const; | |||||
const CTxOut &GetOutputFor(const CTxIn &input) const; | const CTxOut &GetOutputFor(const CTxIn &input) const; | ||||
private: | private: | ||||
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 | ||||
Show All 15 Lines |