Changeset View
Changeset View
Standalone View
Standalone View
src/txmempool.cpp
Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | |||||
CTxMemPoolEntry::CTxMemPoolEntry(const CTransactionRef &_tx, const Amount fee, | CTxMemPoolEntry::CTxMemPoolEntry(const CTransactionRef &_tx, const Amount fee, | ||||
int64_t time, unsigned int entry_height, | int64_t time, unsigned int entry_height, | ||||
bool spends_coinbase, int64_t _sigChecks, | bool spends_coinbase, int64_t _sigChecks, | ||||
LockPoints lp) | LockPoints lp) | ||||
: tx{_tx}, nFee{fee}, | : tx{_tx}, nFee{fee}, | ||||
nTxSize(tx->GetTotalSize()), nUsageSize{RecursiveDynamicUsage(tx)}, | nTxSize(tx->GetTotalSize()), nUsageSize{RecursiveDynamicUsage(tx)}, | ||||
nTime(time), entryHeight{entry_height}, spendsCoinbase(spends_coinbase), | nTime(time), entryHeight{entry_height}, spendsCoinbase(spends_coinbase), | ||||
sigChecks(_sigChecks), lockPoints(lp), nSizeWithDescendants{GetTxSize()}, | sigChecks(_sigChecks), lockPoints(lp) {} | ||||
nSigChecksWithDescendants{sigChecks}, nSizeWithAncestors{GetTxSize()}, | |||||
nSigChecksWithAncestors{sigChecks} {} | |||||
size_t CTxMemPoolEntry::GetTxVirtualSize() const { | size_t CTxMemPoolEntry::GetTxVirtualSize() const { | ||||
return GetVirtualTransactionSize(nTxSize, sigChecks); | return GetVirtualTransactionSize(nTxSize, sigChecks); | ||||
} | } | ||||
// Remove after wellinggton | |||||
uint64_t CTxMemPoolEntry::GetVirtualSizeWithDescendants() const { | |||||
// note this is distinct from the sum of descendants' individual virtual | |||||
// sizes, and may be smaller. | |||||
return GetVirtualTransactionSize(nSizeWithDescendants, | |||||
nSigChecksWithDescendants); | |||||
} | |||||
// Remove after wellinggton | |||||
uint64_t CTxMemPoolEntry::GetVirtualSizeWithAncestors() const { | |||||
// note this is distinct from the sum of ancestors' individual virtual | |||||
// sizes, and may be smaller. | |||||
return GetVirtualTransactionSize(nSizeWithAncestors, | |||||
nSigChecksWithAncestors); | |||||
} | |||||
void CTxMemPoolEntry::UpdateFeeDelta(Amount newFeeDelta) { | void CTxMemPoolEntry::UpdateFeeDelta(Amount newFeeDelta) { | ||||
feeDelta = newFeeDelta; | feeDelta = newFeeDelta; | ||||
} | } | ||||
void CTxMemPoolEntry::UpdateLockPoints(const LockPoints &lp) { | void CTxMemPoolEntry::UpdateLockPoints(const LockPoints &lp) { | ||||
lockPoints = lp; | lockPoints = lp; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 963 Lines • Show Last 20 Lines |