Changeset View
Changeset View
Standalone View
Standalone View
src/test/test_bitcoin_fuzzy.cpp
Show First 20 Lines • Show All 186 Lines • ▼ Show 20 Lines | switch (test_id) { | ||||
CService s; | CService s; | ||||
ds >> s; | ds >> s; | ||||
} catch (const std::ios_base::failure &e) { | } catch (const std::ios_base::failure &e) { | ||||
return 0; | return 0; | ||||
} | } | ||||
break; | break; | ||||
} | } | ||||
case CMESSAGEHEADER_DESERIALIZE: { | case CMESSAGEHEADER_DESERIALIZE: { | ||||
CMessageHeader::MessageStartChars pchMessageStart = {0x00, 0x00, | CMessageHeader::MessageMagic pchMessageStart = {0x00, 0x00, 0x00, | ||||
0x00, 0x00}; | 0x00}; | ||||
try { | try { | ||||
CMessageHeader mh(pchMessageStart); | CMessageHeader mh(pchMessageStart); | ||||
ds >> mh; | ds >> mh; | ||||
if (!mh.IsValid(pchMessageStart)) { | if (!mh.IsValid(pchMessageStart)) { | ||||
return 0; | return 0; | ||||
} | } | ||||
} catch (const std::ios_base::failure &e) { | } catch (const std::ios_base::failure &e) { | ||||
return 0; | return 0; | ||||
▲ Show 20 Lines • Show All 55 Lines • Show Last 20 Lines |