diff options
author | MarcoFalke <falke.marco@gmail.com> | 2019-11-08 11:10:13 -0500 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2019-11-15 13:40:14 -0500 |
commit | fa538813b1c382cf135cbf2a0cc3fa01f36964d8 (patch) | |
tree | 2263582cc4ae02e22ba28072a4f527842c54e39f /src/test/validation_block_tests.cpp | |
parent | 8888ad02e204b0fa7a2ea2cfed2fc3f298cf1623 (diff) |
scripted-diff: Replace ::mempool with m_node.mempool in tests
-BEGIN VERIFY SCRIPT-
# tx pool member access (mempool followed by dot)
sed --regexp-extended -i -e 's/(::)?\<mempool\>\.([a-zA-Z])/m_node.mempool->\2/g' $(git grep -l mempool ./src/test)
# plain global (mempool not preceeded by dot, but followed by comma)
sed --regexp-extended -i -e 's/([^\.])(::)?\<mempool\>,/\1*m_node.mempool,/g' $(git grep -l mempool ./src/test)
-END VERIFY SCRIPT-
Diffstat (limited to 'src/test/validation_block_tests.cpp')
-rw-r--r-- | src/test/validation_block_tests.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/validation_block_tests.cpp b/src/test/validation_block_tests.cpp index 1e8c71d068..3431eedff6 100644 --- a/src/test/validation_block_tests.cpp +++ b/src/test/validation_block_tests.cpp @@ -278,7 +278,7 @@ BOOST_AUTO_TEST_CASE(mempool_locks_reorg) std::list<CTransactionRef> plTxnReplaced; for (const auto& tx : txs) { BOOST_REQUIRE(AcceptToMemoryPool( - ::mempool, + *m_node.mempool, state, tx, &plTxnReplaced, @@ -289,8 +289,8 @@ BOOST_AUTO_TEST_CASE(mempool_locks_reorg) // Check that all txs are in the pool { - LOCK(::mempool.cs); - BOOST_CHECK_EQUAL(::mempool.mapTx.size(), txs.size()); + LOCK(m_node.mempool->cs); + BOOST_CHECK_EQUAL(m_node.mempool->mapTx.size(), txs.size()); } // Run a thread that simulates an RPC caller that is polling while @@ -300,8 +300,8 @@ BOOST_AUTO_TEST_CASE(mempool_locks_reorg) // the transactions invalidated by the reorg, or none of them, and // not some intermediate amount. while (true) { - LOCK(::mempool.cs); - if (::mempool.mapTx.size() == 0) { + LOCK(m_node.mempool->cs); + if (m_node.mempool->mapTx.size() == 0) { // We are done with the reorg break; } @@ -310,7 +310,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(::mempool.mapTx.size() == txs.size()); + assert(m_node.mempool->mapTx.size() == txs.size()); continue; } LOCK(cs_main); |