aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheCharlatan <seb.kung@gmail.com>2023-11-01 20:21:43 +0100
committerTheCharlatan <seb.kung@gmail.com>2023-11-10 16:44:47 +0100
commit4dd94ca18f6fc843137ffca3e6d3e97e4f19377b (patch)
treed1610922955247cd47a39f054dd9866073fbc361
parentd0cd2e804ec9b278ed9699c2ae48574b1c1613b1 (diff)
downloadbitcoin-4dd94ca18f6fc843137ffca3e6d3e97e4f19377b.tar.xz
[refactor] remove access to mapTx in validation_block_tests
Use the helper function instead of reaching into the mapTx member object.
-rw-r--r--src/test/validation_block_tests.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/test/validation_block_tests.cpp b/src/test/validation_block_tests.cpp
index 64cb5522eb..35e5c6a037 100644
--- a/src/test/validation_block_tests.cpp
+++ b/src/test/validation_block_tests.cpp
@@ -283,8 +283,7 @@ BOOST_AUTO_TEST_CASE(mempool_locks_reorg)
// Check that all txs are in the pool
{
- LOCK(m_node.mempool->cs);
- BOOST_CHECK_EQUAL(m_node.mempool->mapTx.size(), txs.size());
+ BOOST_CHECK_EQUAL(m_node.mempool->size(), txs.size());
}
// Run a thread that simulates an RPC caller that is polling while
@@ -295,7 +294,7 @@ BOOST_AUTO_TEST_CASE(mempool_locks_reorg)
// not some intermediate amount.
while (true) {
LOCK(m_node.mempool->cs);
- if (m_node.mempool->mapTx.size() == 0) {
+ if (m_node.mempool->size() == 0) {
// We are done with the reorg
break;
}
@@ -304,7 +303,7 @@ BOOST_AUTO_TEST_CASE(mempool_locks_reorg)
// be atomic. So the caller assumes that the returned mempool
// is consistent. That is, it has all txs that were there
// before the reorg.
- assert(m_node.mempool->mapTx.size() == txs.size());
+ assert(m_node.mempool->size() == txs.size());
continue;
}
LOCK(cs_main);