[refactor] Don't call AcceptToMemoryPool() from outside validation.cpp

This commit is contained in:
John Newbery
2021-09-27 17:47:21 +01:00
parent 92a3aeecf6
commit 2c64270bbe
9 changed files with 28 additions and 24 deletions

View File

@@ -315,7 +315,7 @@ CMutableTransaction TestChain100Setup::CreateValidMempoolTransaction(CTransactio
// If submit=true, add transaction to the mempool.
if (submit) {
LOCK(cs_main);
const MempoolAcceptResult result = AcceptToMemoryPool(m_node.chainman->ActiveChainstate(), *m_node.mempool.get(), MakeTransactionRef(mempool_txn), /* bypass_limits */ false);
const MempoolAcceptResult result = m_node.chainman->ProcessTransaction(MakeTransactionRef(mempool_txn));
assert(result.m_result_type == MempoolAcceptResult::ResultType::VALID);
}