Changeset View
Changeset View
Standalone View
Standalone View
src/primitives/transaction.h
Show First 20 Lines • Show All 258 Lines • ▼ Show 20 Lines | public: | ||||
const TxId GetId() const { return TxId(hash); } | const TxId GetId() const { return TxId(hash); } | ||||
const TxHash GetHash() const { return TxHash(hash); } | const TxHash GetHash() const { return TxHash(hash); } | ||||
// Return sum of txouts. | // Return sum of txouts. | ||||
Amount GetValueOut() const; | Amount GetValueOut() const; | ||||
// GetValueIn() is a method on CCoinsViewCache, because | // GetValueIn() is a method on CCoinsViewCache, because | ||||
// inputs must be known to compute value in. | // inputs must be known to compute value in. | ||||
// Compute priority, given priority of inputs and (optionally) tx size | |||||
double ComputePriority(double dPriorityInputs, | |||||
unsigned int nTxSize = 0) const; | |||||
// Compute modified tx size for priority calculation (optionally given tx | |||||
// size) | |||||
unsigned int CalculateModifiedSize(unsigned int nTxSize = 0) const; | |||||
/** | /** | ||||
* Get the total transaction size in bytes. | * Get the total transaction size in bytes. | ||||
* @return Total transaction size in bytes | * @return Total transaction size in bytes | ||||
*/ | */ | ||||
unsigned int GetTotalSize() const; | unsigned int GetTotalSize() const; | ||||
bool IsCoinBase() const { | bool IsCoinBase() const { | ||||
return (vin.size() == 1 && vin[0].prevout.IsNull()); | return (vin.size() == 1 && vin[0].prevout.IsNull()); | ||||
▲ Show 20 Lines • Show All 85 Lines • Show Last 20 Lines |