aboutsummaryrefslogtreecommitdiff
path: root/src/test/denialofservice_tests.cpp
diff options
context:
space:
mode:
authorCarl Dong <contact@carldong.me>2020-09-09 16:15:15 -0400
committerCarl Dong <contact@carldong.me>2021-06-10 15:04:39 -0400
commit0d61634c066a7102d539e85e2b1a4ca15be9660a (patch)
tree7e59397f75cc7b96a236f1ec3478aa37090c977d /src/test/denialofservice_tests.cpp
parente197076219e986ede6cf924e0ea36bd723503b2d (diff)
downloadbitcoin-0d61634c066a7102d539e85e2b1a4ca15be9660a.tar.xz
scripted-diff: test: Use existing chainman in unit tests
-BEGIN VERIFY SCRIPT- git ls-files -- src/test \ | grep -v '^src/test/fuzz' \ | xargs sed -i -E \ -e 's@g_chainman\.m_blockman@m_node.chainman->m_blockman@g' \ -e 's@([^:])(Chain(state|)Active)@\1::\2@g' \ -e 's@::Chain(state|)Active\(\)@m_node.chainman->ActiveChain\1()@g' -END VERIFY SCRIPT-
Diffstat (limited to 'src/test/denialofservice_tests.cpp')
-rw-r--r--src/test/denialofservice_tests.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/denialofservice_tests.cpp b/src/test/denialofservice_tests.cpp
index a56ce51acb..46d4fa0c43 100644
--- a/src/test/denialofservice_tests.cpp
+++ b/src/test/denialofservice_tests.cpp
@@ -83,8 +83,8 @@ BOOST_AUTO_TEST_CASE(outbound_slow_chain_eviction)
// This test requires that we have a chain with non-zero work.
{
LOCK(cs_main);
- BOOST_CHECK(::ChainActive().Tip() != nullptr);
- BOOST_CHECK(::ChainActive().Tip()->nChainWork > 0);
+ BOOST_CHECK(m_node.chainman->ActiveChain().Tip() != nullptr);
+ BOOST_CHECK(m_node.chainman->ActiveChain().Tip()->nChainWork > 0);
}
// Test starts here