MCPcopy Create free account
hub / github.com/ElementsProject/elements / FUZZ_TARGET_INIT

Function FUZZ_TARGET_INIT

src/test/fuzz/hex.cpp:24–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22}
23
24FUZZ_TARGET_INIT(hex, initialize_hex)
25{
26 const std::string random_hex_string(buffer.begin(), buffer.end());
27 const std::vector<unsigned char> data = ParseHex(random_hex_string);
28 const std::string hex_data = HexStr(data);
29 if (IsHex(random_hex_string)) {
30 assert(ToLower(random_hex_string) == hex_data);
31 }
32 (void)IsHexNumber(random_hex_string);
33 uint256 result;
34 (void)ParseHashStr(random_hex_string, result);
35 (void)uint256S(random_hex_string);
36 try {
37 (void)HexToPubKey(random_hex_string);
38 } catch (const UniValue&) {
39 }
40 CBlockHeader block_header;
41 (void)DecodeHexBlockHeader(block_header, random_hex_string);
42 CBlock block;
43 (void)DecodeHexBlk(block, random_hex_string);
44}

Callers

nothing calls this directly

Calls 12

ParseHexFunction · 0.85
IsHexFunction · 0.85
IsHexNumberFunction · 0.85
ParseHashStrFunction · 0.85
uint256SFunction · 0.85
HexToPubKeyFunction · 0.85
DecodeHexBlockHeaderFunction · 0.85
DecodeHexBlkFunction · 0.85
HexStrFunction · 0.50
ToLowerFunction · 0.50
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected