Skip to content

Commit

Permalink
tests: Fill fuzzing coverage gaps for functions in primitives/block.h
Browse files Browse the repository at this point in the history
  • Loading branch information
practicalswift committed May 14, 2020
1 parent 553bb3f commit c0bbf81
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/test/fuzz/block_header.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,12 @@ void test_one_input(const std::vector<uint8_t>& buffer)
block.SetNull();
assert(block.GetBlockHeader().GetHash() == mut_block_header.GetHash());
}
{
std::optional<CBlockLocator> block_locator = ConsumeDeserializable<CBlockLocator>(fuzzed_data_provider);
if (block_locator) {
(void)block_locator->IsNull();
block_locator->SetNull();
assert(block_locator->IsNull());
}
}
}

0 comments on commit c0bbf81

Please sign in to comment.