mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-06-02 15:32:34 +02:00
tests: Fill fuzzing coverage gaps for functions in primitives/block.h
This commit is contained in:
parent
553bb3fc3d
commit
c0bbf8193d
@ -38,4 +38,12 @@ void test_one_input(const std::vector<uint8_t>& buffer)
|
|||||||
block.SetNull();
|
block.SetNull();
|
||||||
assert(block.GetBlockHeader().GetHash() == mut_block_header.GetHash());
|
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());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user