Changeset View
Changeset View
Standalone View
Standalone View
src/txmempool.cpp
Show First 20 Lines • Show All 776 Lines • ▼ Show 20 Lines | for (indexed_transaction_set::const_iterator it = mapTx.begin(); | ||||
// Verify ancestor state is correct. | // Verify ancestor state is correct. | ||||
setEntries setAncestors; | setEntries setAncestors; | ||||
uint64_t nNoLimit = std::numeric_limits<uint64_t>::max(); | uint64_t nNoLimit = std::numeric_limits<uint64_t>::max(); | ||||
std::string dummy; | std::string dummy; | ||||
CalculateMemPoolAncestors(*it, setAncestors, nNoLimit, nNoLimit, | CalculateMemPoolAncestors(*it, setAncestors, nNoLimit, nNoLimit, | ||||
nNoLimit, nNoLimit, dummy); | nNoLimit, nNoLimit, dummy); | ||||
uint64_t nCountCheck = setAncestors.size() + 1; | uint64_t nCountCheck = setAncestors.size() + 1; | ||||
uint64_t nSizeCheck = it->GetTxSize(); | uint64_t nSizeCheck = it->GetTxSize(); | ||||
uint64_t nBillableSizeCheck = it->GetTxBillableSize(); | |||||
Amount nFeesCheck = it->GetModifiedFee(); | Amount nFeesCheck = it->GetModifiedFee(); | ||||
int64_t nSigOpCheck = it->GetSigOpCount(); | int64_t nSigOpCheck = it->GetSigOpCount(); | ||||
for (txiter ancestorIt : setAncestors) { | for (txiter ancestorIt : setAncestors) { | ||||
nSizeCheck += ancestorIt->GetTxSize(); | nSizeCheck += ancestorIt->GetTxSize(); | ||||
nBillableSizeCheck += ancestorIt->GetTxBillableSize(); | |||||
nFeesCheck += ancestorIt->GetModifiedFee(); | nFeesCheck += ancestorIt->GetModifiedFee(); | ||||
nSigOpCheck += ancestorIt->GetSigOpCount(); | nSigOpCheck += ancestorIt->GetSigOpCount(); | ||||
} | } | ||||
assert(it->GetCountWithAncestors() == nCountCheck); | assert(it->GetCountWithAncestors() == nCountCheck); | ||||
assert(it->GetSizeWithAncestors() == nSizeCheck); | assert(it->GetSizeWithAncestors() == nSizeCheck); | ||||
assert(it->GetBillableSizeWithAncestors() == nBillableSizeCheck); | |||||
assert(it->GetSigOpCountWithAncestors() == nSigOpCheck); | assert(it->GetSigOpCountWithAncestors() == nSigOpCheck); | ||||
assert(it->GetModFeesWithAncestors() == nFeesCheck); | assert(it->GetModFeesWithAncestors() == nFeesCheck); | ||||
// Check children against mapNextTx | // Check children against mapNextTx | ||||
CTxMemPool::setEntries setChildrenCheck; | CTxMemPool::setEntries setChildrenCheck; | ||||
auto iter = mapNextTx.lower_bound(COutPoint(it->GetTx().GetId(), 0)); | auto iter = mapNextTx.lower_bound(COutPoint(it->GetTx().GetId(), 0)); | ||||
int64_t childSizes = 0; | int64_t childSizes = 0; | ||||
for (; iter != mapNextTx.end() && | for (; iter != mapNextTx.end() && | ||||
▲ Show 20 Lines • Show All 600 Lines • Show Last 20 Lines |