Changeset View
Changeset View
Standalone View
Standalone View
src/test/fuzz/block_header.cpp
Show All 34 Lines | if (!block_header) { | ||||
mut_block_header.SetNull(); | mut_block_header.SetNull(); | ||||
assert(mut_block_header.IsNull()); | assert(mut_block_header.IsNull()); | ||||
CBlock block{*block_header}; | CBlock block{*block_header}; | ||||
assert(block.GetBlockHeader().GetHash() == block_header->GetHash()); | assert(block.GetBlockHeader().GetHash() == block_header->GetHash()); | ||||
(void)block.ToString(); | (void)block.ToString(); | ||||
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()); | |||||
} | |||||
} | |||||
} | } |