Changeset View
Changeset View
Standalone View
Standalone View
src/txmempool.cpp
Show First 20 Lines • Show All 47 Lines • ▼ Show 20 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; | ||||
} | } | ||||
double CTxMemPoolEntry::GetPriority(unsigned int currentHeight) const { | |||||
double deltaPriority = | |||||
double((currentHeight - entryHeight) * (inChainInputValue / SATOSHI)) / | |||||
nModSize; | |||||
double dResult = entryPriority + deltaPriority; | |||||
// This should only happen if it was called with a height below entry height | |||||
if (dResult < 0) { | |||||
dResult = 0; | |||||
} | |||||
return dResult; | |||||
} | |||||
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,340 Lines • Show Last 20 Lines |