@@ -704,14 +704,12 @@ void CTxMemPool::check(CChainState& active_chainstate) const
704704 if (it2 != mapTx.end ()) {
705705 const CTransaction& tx2 = it2->GetTx ();
706706 assert (tx2.vout .size () > txin.prevout .n && !tx2.vout [txin.prevout .n ].IsNull ());
707- // We are iterating through the mempool entries sorted in order by ancestor count.
708- // All parents must have been checked before their children and their coins added to
709- // the mempoolDuplicate coins cache.
710- assert (mempoolDuplicate.HaveCoin (txin.prevout ));
711707 setParentCheck.insert (*it2);
712- } else {
713- assert (active_coins_tip.HaveCoin (txin.prevout ));
714708 }
709+ // We are iterating through the mempool entries sorted in order by ancestor count.
710+ // All parents must have been checked before their children and their coins added to
711+ // the mempoolDuplicate coins cache.
712+ assert (mempoolDuplicate.HaveCoin (txin.prevout ));
715713 // Check whether its inputs are marked in mapNextTx.
716714 auto it3 = mapNextTx.find (txin.prevout );
717715 assert (it3 != mapNextTx.end ());
@@ -766,8 +764,8 @@ void CTxMemPool::check(CChainState& active_chainstate) const
766764
767765 TxValidationState dummy_state; // Not used. CheckTxInputs() should always pass
768766 CAmount txfee = 0 ;
769- bool fCheckResult = tx.IsCoinBase () || Consensus::CheckTxInputs (tx, dummy_state, mempoolDuplicate, spendheight, txfee );
770- assert (fCheckResult );
767+ assert (! tx.IsCoinBase ());
768+ assert (Consensus::CheckTxInputs (tx, dummy_state, mempoolDuplicate, spendheight, txfee) );
771769 for (const auto & input: tx.vin ) mempoolDuplicate.SpendCoin (input.prevout );
772770 AddCoins (mempoolDuplicate, tx, std::numeric_limits<int >::max ());
773771 }
0 commit comments