mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
validation: Pass in chainstate to CTxMemPool::check
This is the only instance where validation reaches for something outside of it.
This commit is contained in:
parent
1fb7b2c595
commit
4744efc9ba
4 changed files with 11 additions and 8 deletions
|
|
@ -2301,7 +2301,7 @@ void PeerManagerImpl::ProcessOrphanTx(std::set<uint256>& orphan_work_set)
|
|||
break;
|
||||
}
|
||||
}
|
||||
m_mempool.check(&::ChainstateActive().CoinsTip());
|
||||
m_mempool.check(m_chainman.ActiveChainstate());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -3262,7 +3262,7 @@ 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(&::ChainstateActive().CoinsTip());
|
||||
m_mempool.check(m_chainman.ActiveChainstate());
|
||||
// As this version of the transaction was acceptable, we can forget about any
|
||||
// requests for it.
|
||||
m_txrequest.ForgetTxHash(tx.GetHash());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue