Changeset View
Changeset View
Standalone View
Standalone View
src/txmempool.cpp
Show First 20 Lines • Show All 373 Lines • ▼ Show 20 Lines | void CTxMemPoolEntry::UpdateAncestorState(int64_t modifySize, Amount modifyFee, | ||||
assert(int64_t(nSizeWithAncestors) > 0); | assert(int64_t(nSizeWithAncestors) > 0); | ||||
nModFeesWithAncestors += modifyFee; | nModFeesWithAncestors += modifyFee; | ||||
nCountWithAncestors += modifyCount; | nCountWithAncestors += modifyCount; | ||||
assert(int64_t(nCountWithAncestors) > 0); | assert(int64_t(nCountWithAncestors) > 0); | ||||
nSigOpCountWithAncestors += modifySigOps; | nSigOpCountWithAncestors += modifySigOps; | ||||
assert(int(nSigOpCountWithAncestors) >= 0); | assert(int(nSigOpCountWithAncestors) >= 0); | ||||
} | } | ||||
CTxMemPool::CTxMemPool(const CFeeRate &_minReasonableRelayFee) | CTxMemPool::CTxMemPool() : nTransactionsUpdated(0) { | ||||
: nTransactionsUpdated(0) { | |||||
// lock free clear | // lock free clear | ||||
_clear(); | _clear(); | ||||
// Sanity checks off by default for performance, because otherwise accepting | // Sanity checks off by default for performance, because otherwise accepting | ||||
// transactions becomes O(N^2) where N is the number of transactions in the | // transactions becomes O(N^2) where N is the number of transactions in the | ||||
// pool | // pool | ||||
nCheckFrequency = 0; | nCheckFrequency = 0; | ||||
minerPolicyEstimator = new CBlockPolicyEstimator(_minReasonableRelayFee); | minerPolicyEstimator = new CBlockPolicyEstimator(); | ||||
} | } | ||||
CTxMemPool::~CTxMemPool() { | CTxMemPool::~CTxMemPool() { | ||||
delete minerPolicyEstimator; | delete minerPolicyEstimator; | ||||
} | } | ||||
bool CTxMemPool::isSpent(const COutPoint &outpoint) { | bool CTxMemPool::isSpent(const COutPoint &outpoint) { | ||||
LOCK(cs); | LOCK(cs); | ||||
▲ Show 20 Lines • Show All 866 Lines • Show Last 20 Lines |