diff options
author | Carl Dong <contact@carldong.me> | 2022-03-21 21:42:40 -0400 |
---|---|---|
committer | Carl Dong <contact@carldong.me> | 2022-06-15 17:28:55 -0400 |
commit | 86e732def3983f99ec84b59375615bedcdc0e664 (patch) | |
tree | 662d9afcfe20ad883661be3db3b90f6f971c25e3 /src/test/validation_flush_tests.cpp | |
parent | 213457e170ce41a0b26c644aa010111df36414a6 (diff) |
scripted-diff: test: Use CTxMemPool in TestingSetup
After this commit, there should be no explicit instantiation of
CTxMemPool in src/test other than those in fuzz/ and setup_common
-BEGIN VERIFY SCRIPT-
find_regex="CTxMemPool\s+([^;({]+)(|\(\)|\{\});" \
&& git grep -l -E "$find_regex" -- src/test \
| grep -v -e "^src/test/util/setup_common.cpp$" \
-e "^src/test/fuzz/" \
| xargs sed -i -E "s@$find_regex@CTxMemPool\& \1 = *Assert(m_node.mempool);@g"
-END VERIFY SCRIPT-
Diffstat (limited to 'src/test/validation_flush_tests.cpp')
-rw-r--r-- | src/test/validation_flush_tests.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/validation_flush_tests.cpp b/src/test/validation_flush_tests.cpp index a34895d4ae..012169b17e 100644 --- a/src/test/validation_flush_tests.cpp +++ b/src/test/validation_flush_tests.cpp @@ -20,7 +20,7 @@ BOOST_FIXTURE_TEST_SUITE(validation_flush_tests, ChainTestingSetup) //! BOOST_AUTO_TEST_CASE(getcoinscachesizestate) { - CTxMemPool mempool; + CTxMemPool& mempool = *Assert(m_node.mempool); BlockManager blockman{}; CChainState chainstate{&mempool, blockman, *Assert(m_node.chainman)}; chainstate.InitCoinsDB(/*cache_size_bytes=*/1 << 10, /*in_memory=*/true, /*should_wipe=*/false); |