Changeset View
Changeset View
Standalone View
Standalone View
src/txmempool.cpp
Show All 40 Lines | CTxMemPoolEntry::CTxMemPoolEntry(const CTransactionRef &_tx, const Amount _nFee, | ||||
feeDelta = Amount::zero(); | feeDelta = Amount::zero(); | ||||
nCountWithAncestors = 1; | nCountWithAncestors = 1; | ||||
nSizeWithAncestors = GetTxSize(); | nSizeWithAncestors = GetTxSize(); | ||||
nModFeesWithAncestors = nFee; | nModFeesWithAncestors = nFee; | ||||
nSigOpCountWithAncestors = sigOpCount; | nSigOpCountWithAncestors = sigOpCount; | ||||
} | } | ||||
size_t CTxMemPoolEntry::GetTxVirtualSize() const { | |||||
return GetVirtualTransactionSize(nTxSize, sigOpCount); | |||||
} | |||||
size_t CTxMemPoolEntry::GetVirtualSizeWithDescendants() const { | |||||
// note this is distinct from the sum of descendants' individual virtual | |||||
// sizes, and may be smaller. | |||||
return GetVirtualTransactionSize(nSizeWithDescendants, | |||||
nSigOpCountWithDescendants); | |||||
} | |||||
size_t CTxMemPoolEntry::GetVirtualSizeWithAncestors() const { | |||||
// note this is distinct from the sum of descendants' individual virtual | |||||
// sizes, and may be smaller. | |||||
return GetVirtualTransactionSize(nSizeWithAncestors, | |||||
nSigOpCountWithAncestors); | |||||
} | |||||
void CTxMemPoolEntry::UpdateFeeDelta(Amount newFeeDelta) { | void CTxMemPoolEntry::UpdateFeeDelta(Amount newFeeDelta) { | ||||
nModFeesWithDescendants += newFeeDelta - feeDelta; | nModFeesWithDescendants += newFeeDelta - feeDelta; | ||||
nModFeesWithAncestors += newFeeDelta - feeDelta; | nModFeesWithAncestors += newFeeDelta - feeDelta; | ||||
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 1,349 Lines • Show Last 20 Lines |