mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 14:53:43 +01:00
[refactor] pass coinsview and height to check()
Removes check's dependency on validation.h
This commit is contained in:
@@ -2298,7 +2298,8 @@ void PeerManagerImpl::ProcessOrphanTx(std::set<uint256>& orphan_work_set)
|
||||
break;
|
||||
}
|
||||
}
|
||||
m_mempool.check(m_chainman.ActiveChainstate());
|
||||
CChainState& active_chainstate = m_chainman.ActiveChainstate();
|
||||
m_mempool.check(active_chainstate.CoinsTip(), active_chainstate.m_chain.Height() + 1);
|
||||
}
|
||||
|
||||
bool PeerManagerImpl::PrepareBlockFilterRequest(CNode& peer,
|
||||
@@ -3260,7 +3261,8 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
|
||||
const TxValidationState& state = result.m_state;
|
||||
|
||||
if (result.m_result_type == MempoolAcceptResult::ResultType::VALID) {
|
||||
m_mempool.check(m_chainman.ActiveChainstate());
|
||||
CChainState& active_chainstate = m_chainman.ActiveChainstate();
|
||||
m_mempool.check(active_chainstate.CoinsTip(), active_chainstate.m_chain.Height() + 1);
|
||||
// As this version of the transaction was acceptable, we can forget about any
|
||||
// requests for it.
|
||||
m_txrequest.ForgetTxHash(tx.GetHash());
|
||||
|
||||
Reference in New Issue
Block a user