diff options
author | Russell Yanofsky <russ@yanofsky.org> | 2020-12-07 20:46:03 -0500 |
---|---|---|
committer | Russell Yanofsky <russ@yanofsky.org> | 2020-12-07 20:46:03 -0500 |
commit | 5baa88fd38c8efa0e361636bb2c60af89d27b5d5 (patch) | |
tree | 28934984ebd700f7b4369b9cf9dd6940d05b0edf /src/test | |
parent | 6965f1352d2d7086d308750ce83a84f191a17755 (diff) | |
download | bitcoin-5baa88fd38c8efa0e361636bb2c60af89d27b5d5.tar.xz |
test: Remove no longer needed MakeChain calls
These calls are no longer needed after edc316020e8270dafc5e31465d532baebdafd3dd
from #19098 which started instantiating BasicTestingSetup.m_node.chain
Patch from MarcoFalke <falke.marco@gmail.com> in
https://github.com/bitcoin/bitcoin/pull/19425#discussion_r526701954
Co-authored-by: MarcoFalke <falke.marco@gmail.com>
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/interfaces_tests.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/interfaces_tests.cpp b/src/test/interfaces_tests.cpp index b8c4bc8605..73463b071e 100644 --- a/src/test/interfaces_tests.cpp +++ b/src/test/interfaces_tests.cpp @@ -17,7 +17,7 @@ BOOST_FIXTURE_TEST_SUITE(interfaces_tests, TestChain100Setup) BOOST_AUTO_TEST_CASE(findBlock) { - auto chain = interfaces::MakeChain(m_node); + auto& chain = m_node.chain; const CChain& active = Assert(m_node.chainman)->ActiveChain(); uint256 hash; @@ -61,7 +61,7 @@ BOOST_AUTO_TEST_CASE(findBlock) BOOST_AUTO_TEST_CASE(findFirstBlockWithTimeAndHeight) { - auto chain = interfaces::MakeChain(m_node); + auto& chain = m_node.chain; const CChain& active = Assert(m_node.chainman)->ActiveChain(); uint256 hash; int height; @@ -73,7 +73,7 @@ BOOST_AUTO_TEST_CASE(findFirstBlockWithTimeAndHeight) BOOST_AUTO_TEST_CASE(findAncestorByHeight) { - auto chain = interfaces::MakeChain(m_node); + auto& chain = m_node.chain; const CChain& active = Assert(m_node.chainman)->ActiveChain(); uint256 hash; BOOST_CHECK(chain->findAncestorByHeight(active[20]->GetBlockHash(), 10, FoundBlock().hash(hash))); @@ -83,7 +83,7 @@ BOOST_AUTO_TEST_CASE(findAncestorByHeight) BOOST_AUTO_TEST_CASE(findAncestorByHash) { - auto chain = interfaces::MakeChain(m_node); + auto& chain = m_node.chain; const CChain& active = Assert(m_node.chainman)->ActiveChain(); int height = -1; BOOST_CHECK(chain->findAncestorByHash(active[20]->GetBlockHash(), active[10]->GetBlockHash(), FoundBlock().height(height))); @@ -93,7 +93,7 @@ BOOST_AUTO_TEST_CASE(findAncestorByHash) BOOST_AUTO_TEST_CASE(findCommonAncestor) { - auto chain = interfaces::MakeChain(m_node); + auto& chain = m_node.chain; const CChain& active = Assert(m_node.chainman)->ActiveChain(); auto* orig_tip = active.Tip(); for (int i = 0; i < 10; ++i) { @@ -123,7 +123,7 @@ BOOST_AUTO_TEST_CASE(findCommonAncestor) BOOST_AUTO_TEST_CASE(hasBlocks) { - auto chain = interfaces::MakeChain(m_node); + auto& chain = m_node.chain; const CChain& active = Assert(m_node.chainman)->ActiveChain(); // Test ranges |