Skip to content

Commit c0bbf81

Browse files
tests: Fill fuzzing coverage gaps for functions in primitives/block.h
1 parent 553bb3f commit c0bbf81

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/test/fuzz/block_header.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,12 @@ void test_one_input(const std::vector<uint8_t>& buffer)
3838
block.SetNull();
3939
assert(block.GetBlockHeader().GetHash() == mut_block_header.GetHash());
4040
}
41+
{
42+
std::optional<CBlockLocator> block_locator = ConsumeDeserializable<CBlockLocator>(fuzzed_data_provider);
43+
if (block_locator) {
44+
(void)block_locator->IsNull();
45+
block_locator->SetNull();
46+
assert(block_locator->IsNull());
47+
}
48+
}
4149
}

0 commit comments

Comments
 (0)