Changeset View
Changeset View
Standalone View
Standalone View
src/test/fuzz/protocol.cpp
Show All 19 Lines | void test_one_input(const std::vector<uint8_t> &buffer) { | ||||
if (!inv) { | if (!inv) { | ||||
return; | return; | ||||
} | } | ||||
try { | try { | ||||
(void)inv->GetCommand(); | (void)inv->GetCommand(); | ||||
} catch (const std::out_of_range &) { | } catch (const std::out_of_range &) { | ||||
} | } | ||||
(void)inv->GetKind(); | (void)inv->GetKind(); | ||||
(void)inv->IsSomeBlock(); | (void)inv->IsGenBlkMsg(); | ||||
(void)inv->IsMsgTx(); | (void)inv->IsMsgTx(); | ||||
(void)inv->ToString(); | (void)inv->ToString(); | ||||
const std::optional<CInv> another_inv = | const std::optional<CInv> another_inv = | ||||
ConsumeDeserializable<CInv>(fuzzed_data_provider); | ConsumeDeserializable<CInv>(fuzzed_data_provider); | ||||
if (!another_inv) { | if (!another_inv) { | ||||
return; | return; | ||||
} | } | ||||
(void)(*inv < *another_inv); | (void)(*inv < *another_inv); | ||||
} | } |