@@ -56,7 +56,7 @@ BOOST_AUTO_TEST_CASE(getcoinscachesizestate)
5656
5757 // Without any coins in the cache, we shouldn't need to flush.
5858 BOOST_CHECK_EQUAL (
59- chainstate.GetCoinsCacheSizeState (tx_pool, MAX_COINS_CACHE_BYTES, /* max_mempool_size_bytes*/ 0 ),
59+ chainstate.GetCoinsCacheSizeState (& tx_pool, MAX_COINS_CACHE_BYTES, /* max_mempool_size_bytes*/ 0 ),
6060 CoinsCacheSizeState::OK);
6161
6262 // If the initial memory allocations of cacheCoins don't match these common
@@ -71,7 +71,7 @@ BOOST_AUTO_TEST_CASE(getcoinscachesizestate)
7171 }
7272
7373 BOOST_CHECK_EQUAL (
74- chainstate.GetCoinsCacheSizeState (tx_pool, MAX_COINS_CACHE_BYTES, /* max_mempool_size_bytes*/ 0 ),
74+ chainstate.GetCoinsCacheSizeState (& tx_pool, MAX_COINS_CACHE_BYTES, /* max_mempool_size_bytes*/ 0 ),
7575 CoinsCacheSizeState::CRITICAL);
7676
7777 BOOST_TEST_MESSAGE (" Exiting cache flush tests early due to unsupported arch" );
@@ -92,34 +92,34 @@ BOOST_AUTO_TEST_CASE(getcoinscachesizestate)
9292 print_view_mem_usage (view);
9393 BOOST_CHECK_EQUAL (view.AccessCoin (res).DynamicMemoryUsage (), COIN_SIZE);
9494 BOOST_CHECK_EQUAL (
95- chainstate.GetCoinsCacheSizeState (tx_pool, MAX_COINS_CACHE_BYTES, /* max_mempool_size_bytes*/ 0 ),
95+ chainstate.GetCoinsCacheSizeState (& tx_pool, MAX_COINS_CACHE_BYTES, /* max_mempool_size_bytes*/ 0 ),
9696 CoinsCacheSizeState::OK);
9797 }
9898
9999 // Adding some additional coins will push us over the edge to CRITICAL.
100100 for (int i{0 }; i < 4 ; ++i) {
101101 add_coin (view);
102102 print_view_mem_usage (view);
103- if (chainstate.GetCoinsCacheSizeState (tx_pool, MAX_COINS_CACHE_BYTES, /* max_mempool_size_bytes*/ 0 ) ==
103+ if (chainstate.GetCoinsCacheSizeState (& tx_pool, MAX_COINS_CACHE_BYTES, /* max_mempool_size_bytes*/ 0 ) ==
104104 CoinsCacheSizeState::CRITICAL) {
105105 break ;
106106 }
107107 }
108108
109109 BOOST_CHECK_EQUAL (
110- chainstate.GetCoinsCacheSizeState (tx_pool, MAX_COINS_CACHE_BYTES, /* max_mempool_size_bytes*/ 0 ),
110+ chainstate.GetCoinsCacheSizeState (& tx_pool, MAX_COINS_CACHE_BYTES, /* max_mempool_size_bytes*/ 0 ),
111111 CoinsCacheSizeState::CRITICAL);
112112
113113 // Passing non-zero max mempool usage should allow us more headroom.
114114 BOOST_CHECK_EQUAL (
115- chainstate.GetCoinsCacheSizeState (tx_pool, MAX_COINS_CACHE_BYTES, /* max_mempool_size_bytes*/ 1 << 10 ),
115+ chainstate.GetCoinsCacheSizeState (& tx_pool, MAX_COINS_CACHE_BYTES, /* max_mempool_size_bytes*/ 1 << 10 ),
116116 CoinsCacheSizeState::OK);
117117
118118 for (int i{0 }; i < 3 ; ++i) {
119119 add_coin (view);
120120 print_view_mem_usage (view);
121121 BOOST_CHECK_EQUAL (
122- chainstate.GetCoinsCacheSizeState (tx_pool, MAX_COINS_CACHE_BYTES, /* max_mempool_size_bytes*/ 1 << 10 ),
122+ chainstate.GetCoinsCacheSizeState (& tx_pool, MAX_COINS_CACHE_BYTES, /* max_mempool_size_bytes*/ 1 << 10 ),
123123 CoinsCacheSizeState::OK);
124124 }
125125
@@ -135,31 +135,31 @@ BOOST_AUTO_TEST_CASE(getcoinscachesizestate)
135135 BOOST_CHECK (usage_percentage >= 0.9 );
136136 BOOST_CHECK (usage_percentage < 1 );
137137 BOOST_CHECK_EQUAL (
138- chainstate.GetCoinsCacheSizeState (tx_pool, MAX_COINS_CACHE_BYTES, 1 << 10 ),
138+ chainstate.GetCoinsCacheSizeState (& tx_pool, MAX_COINS_CACHE_BYTES, 1 << 10 ),
139139 CoinsCacheSizeState::LARGE);
140140 }
141141
142142 // Using the default max_* values permits way more coins to be added.
143143 for (int i{0 }; i < 1000 ; ++i) {
144144 add_coin (view);
145145 BOOST_CHECK_EQUAL (
146- chainstate.GetCoinsCacheSizeState (tx_pool),
146+ chainstate.GetCoinsCacheSizeState (& tx_pool),
147147 CoinsCacheSizeState::OK);
148148 }
149149
150150 // Flushing the view doesn't take us back to OK because cacheCoins has
151151 // preallocated memory that doesn't get reclaimed even after flush.
152152
153153 BOOST_CHECK_EQUAL (
154- chainstate.GetCoinsCacheSizeState (tx_pool, MAX_COINS_CACHE_BYTES, 0 ),
154+ chainstate.GetCoinsCacheSizeState (& tx_pool, MAX_COINS_CACHE_BYTES, 0 ),
155155 CoinsCacheSizeState::CRITICAL);
156156
157157 view.SetBestBlock (InsecureRand256 ());
158158 BOOST_CHECK (view.Flush ());
159159 print_view_mem_usage (view);
160160
161161 BOOST_CHECK_EQUAL (
162- chainstate.GetCoinsCacheSizeState (tx_pool, MAX_COINS_CACHE_BYTES, 0 ),
162+ chainstate.GetCoinsCacheSizeState (& tx_pool, MAX_COINS_CACHE_BYTES, 0 ),
163163 CoinsCacheSizeState::CRITICAL);
164164}
165165
0 commit comments