Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13711307
D12173.id35526.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D12173.id35526.diff
View Options
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -790,15 +790,13 @@
const CTransaction &tx2 = it2->GetTx();
assert(tx2.vout.size() > txin.prevout.GetN() &&
!tx2.vout[txin.prevout.GetN()].IsNull());
- // We are iterating through the mempool entries sorted in order
- // by ancestor count.
- // All parents must have been checked before their children and
- // their coins added to the mempoolDuplicate coins cache.
- assert(mempoolDuplicate.HaveCoin(txin.prevout));
setParentCheck.insert(*it2);
- } else {
- assert(active_coins_tip.HaveCoin(txin.prevout));
}
+ // We are iterating through the mempool entries sorted in order by
+ // ancestor count.
+ // All parents must have been checked before their children and
+ // their coins added to the mempoolDuplicate coins cache.
+ assert(mempoolDuplicate.HaveCoin(txin.prevout));
// Check whether its inputs are marked in mapNextTx.
auto it3 = mapNextTx.find(txin.prevout);
assert(it3 != mapNextTx.end());
@@ -866,11 +864,9 @@
// Not used. CheckTxInputs() should always pass
TxValidationState dummy_state;
Amount txfee{Amount::zero()};
- bool fCheckResult =
- tx.IsCoinBase() ||
- Consensus::CheckTxInputs(tx, dummy_state, mempoolDuplicate,
- spendheight, txfee);
- assert(fCheckResult);
+ assert(!tx.IsCoinBase());
+ assert(Consensus::CheckTxInputs(tx, dummy_state, mempoolDuplicate,
+ spendheight, txfee));
for (const auto &input : tx.vin) {
mempoolDuplicate.SpendCoin(input.prevout);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 26, 11:30 (16 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5571139
Default Alt Text
D12173.id35526.diff (1 KB)
Attached To
D12173: [mempool] simplify some check() logic
Event Timeline
Log In to Comment