mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Merge ec4d27fa8b into merged_master (Bitcoin PR #18216)
This commit is contained in:
commit
f32fd217a5
15 changed files with 81 additions and 76 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue