Changeset View
Changeset View
Standalone View
Standalone View
src/coins.h
Show First 20 Lines • Show All 260 Lines • ▼ Show 20 Lines | public: | ||||
*/ | */ | ||||
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 | * Return "valid" tx input value | ||||
* 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. | * TODO: This should be able to be replaced with GetValueIn, but there are | ||||
* some additional checks in this code that need to be verified as | |||||
* removable. | |||||
*/ | |||||
Amount GetChainValidTxInputValue(const CTransaction &tx, int nHeight) const; | |||||
/** | |||||
* Return number of coins*blocks destroyed in this transaction. | |||||
*/ | */ | ||||
double GetPriority(const CTransaction &tx, int nHeight, | double GetCoinBlocksDestroyed(const CTransaction &tx, int nHeight) const; | ||||
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; | ||||
/** | /** | ||||
* By making the copy constructor private, we prevent accidentally using it | * By making the copy constructor private, we prevent accidentally using it | ||||
Show All 15 Lines |