@@ -671,15 +671,6 @@ void CTxMemPool::clear()
671
671
_clear ();
672
672
}
673
673
674
- static void CheckInputsAndUpdateCoins (const CTransaction& tx, CCoinsViewCache& mempoolDuplicate, const int64_t spendheight)
675
- {
676
- TxValidationState dummy_state; // Not used. CheckTxInputs() should always pass
677
- CAmount txfee = 0 ;
678
- bool fCheckResult = tx.IsCoinBase () || Consensus::CheckTxInputs (tx, dummy_state, mempoolDuplicate, spendheight, txfee);
679
- assert (fCheckResult );
680
- UpdateCoins (tx, mempoolDuplicate, std::numeric_limits<int >::max ());
681
- }
682
-
683
674
void CTxMemPool::check (CChainState& active_chainstate) const
684
675
{
685
676
if (m_check_ratio == 0 ) return ;
@@ -772,7 +763,11 @@ void CTxMemPool::check(CChainState& active_chainstate) const
772
763
// just a sanity check, not definitive that this calc is correct...
773
764
assert (it->GetSizeWithDescendants () >= child_sizes + it->GetTxSize ());
774
765
775
- CheckInputsAndUpdateCoins (tx, mempoolDuplicate, spendheight);
766
+ TxValidationState dummy_state; // Not used. CheckTxInputs() should always pass
767
+ CAmount txfee = 0 ;
768
+ bool fCheckResult = tx.IsCoinBase () || Consensus::CheckTxInputs (tx, dummy_state, mempoolDuplicate, spendheight, txfee);
769
+ assert (fCheckResult );
770
+ UpdateCoins (tx, mempoolDuplicate, std::numeric_limits<int >::max ());
776
771
}
777
772
for (auto it = mapNextTx.cbegin (); it != mapNextTx.cend (); it++) {
778
773
uint256 hash = it->second ->GetHash ();
0 commit comments