@@ -657,6 +657,7 @@ void CTxMemPool::check(const CCoinsViewCache *pcoins) const
657
657
uint64_t innerUsage = 0 ;
658
658
659
659
CCoinsViewCache mempoolDuplicate (const_cast <CCoinsViewCache*>(pcoins));
660
+ const int64_t nSpendHeight = GetSpendHeight (mempoolDuplicate);
660
661
661
662
LOCK (cs);
662
663
list<const CTxMemPoolEntry*> waitingOnDependants;
@@ -737,7 +738,9 @@ void CTxMemPool::check(const CCoinsViewCache *pcoins) const
737
738
waitingOnDependants.push_back (&(*it));
738
739
else {
739
740
CValidationState state;
740
- assert (CheckInputs (tx, state, mempoolDuplicate, false , 0 , false , NULL ));
741
+ bool fCheckResult = tx.IsCoinBase () ||
742
+ Consensus::CheckTxInputs (tx, state, mempoolDuplicate, nSpendHeight);
743
+ assert (fCheckResult );
741
744
UpdateCoins (tx, mempoolDuplicate, 1000000 );
742
745
}
743
746
}
@@ -751,7 +754,9 @@ void CTxMemPool::check(const CCoinsViewCache *pcoins) const
751
754
stepsSinceLastRemove++;
752
755
assert (stepsSinceLastRemove < waitingOnDependants.size ());
753
756
} else {
754
- assert (CheckInputs (entry->GetTx (), state, mempoolDuplicate, false , 0 , false , NULL ));
757
+ bool fCheckResult = entry->GetTx ().IsCoinBase () ||
758
+ Consensus::CheckTxInputs (entry->GetTx (), state, mempoolDuplicate, nSpendHeight);
759
+ assert (fCheckResult );
755
760
UpdateCoins (entry->GetTx (), mempoolDuplicate, 1000000 );
756
761
stepsSinceLastRemove = 0 ;
757
762
}
0 commit comments