diff options
Diffstat (limited to 'src/test/coinstatsindex_tests.cpp')
-rw-r--r-- | src/test/coinstatsindex_tests.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/test/coinstatsindex_tests.cpp b/src/test/coinstatsindex_tests.cpp index 132c4e53e7..2a6a777cfe 100644 --- a/src/test/coinstatsindex_tests.cpp +++ b/src/test/coinstatsindex_tests.cpp @@ -5,6 +5,7 @@ #include <chainparams.h> #include <index/coinstatsindex.h> #include <interfaces/chain.h> +#include <kernel/coinstats.h> #include <test/util/setup_common.h> #include <test/util/validation.h> #include <util/time.h> @@ -38,7 +39,7 @@ BOOST_FIXTURE_TEST_CASE(coinstatsindex_initial_sync, TestChain100Setup) } // CoinStatsIndex should not be found before it is started. - BOOST_CHECK(!coin_stats_index.LookUpStats(block_index)); + BOOST_CHECK(!coin_stats_index.LookUpStats(*block_index)); // BlockUntilSyncedToCurrentChain should return false before CoinStatsIndex // is started. @@ -54,10 +55,10 @@ BOOST_FIXTURE_TEST_CASE(coinstatsindex_initial_sync, TestChain100Setup) LOCK(cs_main); genesis_block_index = m_node.chainman->ActiveChain().Genesis(); } - BOOST_CHECK(coin_stats_index.LookUpStats(genesis_block_index)); + BOOST_CHECK(coin_stats_index.LookUpStats(*genesis_block_index)); // Check that CoinStatsIndex updates with new blocks. - BOOST_CHECK(coin_stats_index.LookUpStats(block_index)); + BOOST_CHECK(coin_stats_index.LookUpStats(*block_index)); const CScript script_pub_key{CScript() << ToByteVector(coinbaseKey.GetPubKey()) << OP_CHECKSIG}; std::vector<CMutableTransaction> noTxns; @@ -71,7 +72,7 @@ BOOST_FIXTURE_TEST_CASE(coinstatsindex_initial_sync, TestChain100Setup) LOCK(cs_main); new_block_index = m_node.chainman->ActiveChain().Tip(); } - BOOST_CHECK(coin_stats_index.LookUpStats(new_block_index)); + BOOST_CHECK(coin_stats_index.LookUpStats(*new_block_index)); BOOST_CHECK(block_index != new_block_index); @@ -85,7 +86,7 @@ BOOST_FIXTURE_TEST_CASE(coinstatsindex_initial_sync, TestChain100Setup) // make sure index is not corrupted and is able to reload. BOOST_FIXTURE_TEST_CASE(coinstatsindex_unclean_shutdown, TestChain100Setup) { - CChainState& chainstate = Assert(m_node.chainman)->ActiveChainstate(); + Chainstate& chainstate = Assert(m_node.chainman)->ActiveChainstate(); const CChainParams& params = Params(); { CoinStatsIndex index{interfaces::MakeChain(m_node), 1 << 20}; |