Skip to content

Commit d5a31b7

Browse files
tests: Add fuzzing harness for functions in primitives/block.h
1 parent a7a6f1f commit d5a31b7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/test/fuzz/block.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,8 @@ void test_one_input(const std::vector<uint8_t>& buffer)
6262
const size_t raw_memory_size = RecursiveDynamicUsage(block);
6363
const size_t raw_memory_size_as_shared_ptr = RecursiveDynamicUsage(std::make_shared<CBlock>(block));
6464
assert(raw_memory_size_as_shared_ptr > raw_memory_size);
65+
CBlock block_copy = block;
66+
block_copy.SetNull();
67+
const bool is_null = block_copy.IsNull();
68+
assert(is_null);
6569
}

0 commit comments

Comments
 (0)