mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
[refactor] return MempoolAcceptResult
This creates a cleaner interface with ATMP, allows us to make results const, and makes accessing values that don't make sense (e.g. fee when tx is invalid) an error.
This commit is contained in:
parent
9db10a5506
commit
f82baf0762
9 changed files with 106 additions and 92 deletions
|
|
@ -283,15 +283,9 @@ BOOST_AUTO_TEST_CASE(mempool_locks_reorg)
|
|||
// Add the txs to the tx pool
|
||||
{
|
||||
LOCK(cs_main);
|
||||
TxValidationState state;
|
||||
std::list<CTransactionRef> plTxnReplaced;
|
||||
for (const auto& tx : txs) {
|
||||
BOOST_REQUIRE(AcceptToMemoryPool(
|
||||
*m_node.mempool,
|
||||
state,
|
||||
tx,
|
||||
&plTxnReplaced,
|
||||
/* bypass_limits */ false));
|
||||
const MempoolAcceptResult result = AcceptToMemoryPool(*m_node.mempool, tx, false /* bypass_limits */);
|
||||
BOOST_REQUIRE(result.m_result_type == MempoolAcceptResult::ResultType::VALID);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue