diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2020-05-09 21:26:00 +0000 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2020-05-14 18:45:42 +0000 |
commit | c0bbf8193d92ba85d62092c4fd886ff4461f65bf (patch) | |
tree | 088362c2a414bf9eabf3f890f40b32c1434a8804 | |
parent | 553bb3fc3d953e00770c11e25d20ecd0efe041e6 (diff) |
tests: Fill fuzzing coverage gaps for functions in primitives/block.h
-rw-r--r-- | src/test/fuzz/block_header.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/fuzz/block_header.cpp b/src/test/fuzz/block_header.cpp index 92dcccc0e1..f0ddae14f6 100644 --- a/src/test/fuzz/block_header.cpp +++ b/src/test/fuzz/block_header.cpp @@ -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()); + } + } } |