diff options
-rw-r--r-- | src/test/fuzz/block.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/test/fuzz/block.cpp b/src/test/fuzz/block.cpp index 431248de4a..4a97eca18a 100644 --- a/src/test/fuzz/block.cpp +++ b/src/test/fuzz/block.cpp @@ -15,6 +15,7 @@ #include <version.h> #include <cassert> +#include <memory> #include <string> void initialize() @@ -59,5 +60,7 @@ void test_one_input(const std::vector<uint8_t>& buffer) } (void)GetBlockWeight(block); (void)GetWitnessCommitmentIndex(block); - (void)RecursiveDynamicUsage(block); + const size_t raw_memory_size = RecursiveDynamicUsage(block); + const size_t raw_memory_size_as_shared_ptr = RecursiveDynamicUsage(std::make_shared<CBlock>(block)); + assert(raw_memory_size_as_shared_ptr > raw_memory_size); } |