Changeset View
Changeset View
Standalone View
Standalone View
src/coins.h
Show First 20 Lines • Show All 306 Lines • ▼ Show 20 Lines | public: | ||||
void Uncache(const COutPoint &outpoint); | void Uncache(const COutPoint &outpoint); | ||||
//! Calculate the size of the cache (in number of transaction outputs) | //! Calculate the size of the cache (in number of transaction outputs) | ||||
unsigned int GetCacheSize() const; | unsigned int GetCacheSize() const; | ||||
//! Calculate the size of the cache (in bytes) | //! Calculate the size of the cache (in bytes) | ||||
size_t DynamicMemoryUsage() const; | size_t DynamicMemoryUsage() const; | ||||
/** | |||||
* Amount of bitcoins coming in to a transaction | |||||
* Note that lightweight clients may not know anything besides the hash of | |||||
* previous transactions, so may not be able to calculate this. | |||||
* | |||||
* @param[in] tx transaction for which we are checking input total | |||||
* @return Sum of value of all inputs (scriptSigs) | |||||
*/ | |||||
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; | ||||
private: | private: | ||||
/** | /** | ||||
* @note this is marked const, but may actually append to `cacheCoins`, | * @note this is marked const, but may actually append to `cacheCoins`, | ||||
* increasing memory usage. | * increasing memory usage. | ||||
▲ Show 20 Lines • Show All 46 Lines • Show Last 20 Lines |