|
|
@ -640,8 +640,6 @@ void CTxMemPool::check(const CCoinsViewCache *pcoins) const
|
|
|
|
innerUsage += memusage::DynamicUsage(links.parents) + memusage::DynamicUsage(links.children);
|
|
|
|
innerUsage += memusage::DynamicUsage(links.parents) + memusage::DynamicUsage(links.children);
|
|
|
|
bool fDependsWait = false;
|
|
|
|
bool fDependsWait = false;
|
|
|
|
setEntries setParentCheck;
|
|
|
|
setEntries setParentCheck;
|
|
|
|
int64_t parentSizes = 0;
|
|
|
|
|
|
|
|
int64_t parentSigOpCost = 0;
|
|
|
|
|
|
|
|
for (const CTxIn &txin : tx.vin) {
|
|
|
|
for (const CTxIn &txin : tx.vin) {
|
|
|
|
// Check that every mempool transaction's inputs refer to available coins, or other mempool tx's.
|
|
|
|
// Check that every mempool transaction's inputs refer to available coins, or other mempool tx's.
|
|
|
|
indexed_transaction_set::const_iterator it2 = mapTx.find(txin.prevout.hash);
|
|
|
|
indexed_transaction_set::const_iterator it2 = mapTx.find(txin.prevout.hash);
|
|
|
@ -649,10 +647,7 @@ void CTxMemPool::check(const CCoinsViewCache *pcoins) const
|
|
|
|
const CTransaction& tx2 = it2->GetTx();
|
|
|
|
const CTransaction& tx2 = it2->GetTx();
|
|
|
|
assert(tx2.vout.size() > txin.prevout.n && !tx2.vout[txin.prevout.n].IsNull());
|
|
|
|
assert(tx2.vout.size() > txin.prevout.n && !tx2.vout[txin.prevout.n].IsNull());
|
|
|
|
fDependsWait = true;
|
|
|
|
fDependsWait = true;
|
|
|
|
if (setParentCheck.insert(it2).second) {
|
|
|
|
setParentCheck.insert(it2);
|
|
|
|
parentSizes += it2->GetTxSize();
|
|
|
|
|
|
|
|
parentSigOpCost += it2->GetSigOpCost();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
assert(pcoins->HaveCoin(txin.prevout));
|
|
|
|
assert(pcoins->HaveCoin(txin.prevout));
|
|
|
|
}
|
|
|
|
}
|
|
|
|