mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-06 18:53:21 +01:00
test: Fix outstanding -Wsign-compare errors
This commit is contained in:
@@ -46,7 +46,7 @@ BOOST_AUTO_TEST_CASE(getcoinscachesizestate)
|
||||
// (prevector<28, unsigned char>) when assigned 56 bytes of data per above.
|
||||
//
|
||||
// See also: Coin::DynamicMemoryUsage().
|
||||
constexpr int COIN_SIZE = is_64_bit ? 80 : 64;
|
||||
constexpr unsigned int COIN_SIZE = is_64_bit ? 80 : 64;
|
||||
|
||||
auto print_view_mem_usage = [](CCoinsViewCache& view) {
|
||||
BOOST_TEST_MESSAGE("CCoinsViewCache memory usage: " << view.DynamicMemoryUsage());
|
||||
@@ -79,7 +79,7 @@ BOOST_AUTO_TEST_CASE(getcoinscachesizestate)
|
||||
}
|
||||
|
||||
print_view_mem_usage(view);
|
||||
BOOST_CHECK_EQUAL(view.DynamicMemoryUsage(), is_64_bit ? 32 : 16);
|
||||
BOOST_CHECK_EQUAL(view.DynamicMemoryUsage(), is_64_bit ? 32U : 16U);
|
||||
|
||||
// We should be able to add COINS_UNTIL_CRITICAL coins to the cache before going CRITICAL.
|
||||
// This is contingent not only on the dynamic memory usage of the Coins
|
||||
|
||||
Reference in New Issue
Block a user