MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / DecodeHexBlockHeader

Function DecodeHexBlockHeader

src/core_io.cpp:235–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233}
234
235bool DecodeHexBlockHeader(CBlockHeader& header, const std::string& hex_header)
236{
237 if (!IsHex(hex_header)) return false;
238
239 const std::vector<unsigned char> header_data{ParseHex(hex_header)};
240 try {
241 SpanReader{header_data} >> header;
242 } catch (const std::exception&) {
243 return false;
244 }
245 return true;
246}
247
248bool DecodeHexBlk(CBlock& block, const std::string& strHexBlk)
249{

Callers 3

GrindFunction · 0.85
FUZZ_TARGETFunction · 0.85
submitheaderFunction · 0.85

Calls 2

IsHexFunction · 0.85
ParseHexFunction · 0.85

Tested by 1

FUZZ_TARGETFunction · 0.68