These CTransactionRefs can be const if you like.
@@ -167,9 +168,9 @@ BOOST_FIXTURE_TEST_CASE(rbf_helper_functions, TestChain100Setup)
// Tests for GetEntriesForConflicts
CTxMemPool::setEntries all_parents{entry1, entry3, entry5, entry7, entry8};
CTxMemPool::setEntries all_children{entry2, entry4, entry6};
- std::vector<CTransactionRef> parent_inputs({m_coinbase_txns[0], m_coinbase_txns[1], m_coinbase_txns[2],
+ const std::vector<CTransactionRef> parent_inputs({m_coinbase_txns[0], m_coinbase_txns[1], m_coinbase_txns[2],
m_coinbase_txns[3], m_coinbase_txns[4]});
- CTransactionRef conflicts_with_parents = make_tx({50 * CENT}, parent_inputs);
+ const CTransactionRef conflicts_with_parents = make_tx({50 * CENT}, parent_inputs);
@@ -209,7 +210,7 @@ BOOST_FIXTURE_TEST_CASE(rbf_helper_functions, TestChain100Setup)
// Tests for HasNoNewUnconfirmed
- CTransactionRef spends_unconfirmed = make_tx({36 * CENT}, {tx1});
+ const CTransactionRef spends_unconfirmed = make_tx({36 * CENT}, {tx1});
@@ -220,11 +221,11 @@ BOOST_FIXTURE_TEST_CASE(rbf_helper_functions, TestChain100Setup)
- CTransactionRef spends_new_unconfirmed = make_tx({36 * CENT}, {tx1, tx8});
+ const CTransactionRef spends_new_unconfirmed = make_tx({36 * CENT}, {tx1, tx8});
BOOST_CHECK(HasNoNewUnconfirmed(*spends_new_unconfirmed.get(), pool, {entry2}).has_value());
BOOST_CHECK(HasNoNewUnconfirmed(*spends_new_unconfirmed.get(), pool, all_entries).has_value());
- CTransactionRef spends_conflicting_confirmed = make_tx({45 * CENT}, {m_coinbase_txns[0], m_coinbase_txns[1]});
+ const CTransactionRef spends_conflicting_confirmed = make_tx({45 * CENT}, {m_coinbase_txns[0], m_coinbase_txns[1]});
}