mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
[refactor] remove access to mapTx in validation_block_tests
Use the helper function instead of reaching into the mapTx member object.
This commit is contained in:
parent
d0cd2e804e
commit
4dd94ca18f
1 changed files with 3 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue