Changeset View
Changeset View
Standalone View
Standalone View
src/txmempool.cpp
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | CTxMemPoolEntry::CTxMemPoolEntry(const CTransactionRef &_tx, const Amount _nFee, | ||||
nCountWithAncestors = 1; | nCountWithAncestors = 1; | ||||
nSizeWithAncestors = GetTxSize(); | nSizeWithAncestors = GetTxSize(); | ||||
nBillableSizeWithAncestors = GetTxBillableSize(); | nBillableSizeWithAncestors = GetTxBillableSize(); | ||||
nModFeesWithAncestors = nFee; | nModFeesWithAncestors = nFee; | ||||
nSigOpCountWithAncestors = sigOpCount; | nSigOpCountWithAncestors = sigOpCount; | ||||
} | } | ||||
CTxMemPoolEntry::CTxMemPoolEntry(const CTxMemPoolEntry &other) { | |||||
*this = other; | |||||
} | |||||
double CTxMemPoolEntry::GetPriority(unsigned int currentHeight) const { | double CTxMemPoolEntry::GetPriority(unsigned int currentHeight) const { | ||||
double deltaPriority = | double deltaPriority = | ||||
double((currentHeight - entryHeight) * (inChainInputValue / SATOSHI)) / | double((currentHeight - entryHeight) * (inChainInputValue / SATOSHI)) / | ||||
nModSize; | nModSize; | ||||
double dResult = entryPriority + deltaPriority; | double dResult = entryPriority + deltaPriority; | ||||
// This should only happen if it was called with a height below entry height | // This should only happen if it was called with a height below entry height | ||||
if (dResult < 0) { | if (dResult < 0) { | ||||
dResult = 0; | dResult = 0; | ||||
▲ Show 20 Lines • Show All 1,337 Lines • Show Last 20 Lines |