diff options
author | Carl Dong <contact@carldong.me> | 2020-09-09 16:05:39 -0400 |
---|---|---|
committer | Carl Dong <contact@carldong.me> | 2021-03-03 14:49:29 -0500 |
commit | 4744efc9bae8b22efb76152a3c045d054c880399 (patch) | |
tree | b3d06bc93b5fbffc378a1991591210dbeebbc273 /src/net_processing.cpp | |
parent | 1fb7b2c59505a6b9768789f6caad215a0a22ef16 (diff) |
validation: Pass in chainstate to CTxMemPool::check
This is the only instance where validation reaches for something outside
of it.
Diffstat (limited to 'src/net_processing.cpp')
-rw-r--r-- | src/net_processing.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp index c97f7ced46..429e0b5e89 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -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()); |