mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-25 22:39:13 +02:00
[refactor] Don't call AcceptToMemoryPool() from outside validation.cpp
This commit is contained in:
@@ -34,10 +34,10 @@ static void AssembleBlock(benchmark::Bench& bench)
|
||||
txs.at(b) = MakeTransactionRef(tx);
|
||||
}
|
||||
{
|
||||
LOCK(::cs_main); // Required for ::AcceptToMemoryPool.
|
||||
LOCK(::cs_main);
|
||||
|
||||
for (const auto& txr : txs) {
|
||||
const MempoolAcceptResult res = ::AcceptToMemoryPool(test_setup->m_node.chainman->ActiveChainstate(), *test_setup->m_node.mempool, txr, false /* bypass_limits */);
|
||||
const MempoolAcceptResult res = test_setup->m_node.chainman->ProcessTransaction(txr);
|
||||
assert(res.m_result_type == MempoolAcceptResult::ResultType::VALID);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user