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

Function DecodeHexBlockHeader

src/core_read.cpp:209–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207}
208
209bool DecodeHexBlockHeader(CBlockHeader& header, const std::string& hex_header)
210{
211 if (!IsHex(hex_header)) return false;
212
213 const std::vector<unsigned char> header_data{ParseHex(hex_header)};
214 CDataStream ser_header(header_data, SER_NETWORK, PROTOCOL_VERSION);
215 try {
216 ser_header >> header;
217 } catch (const std::exception&) {
218 return false;
219 }
220 return true;
221}
222
223bool DecodeHexBlk(CBlock& block, const std::string& strHexBlk)
224{

Callers 3

GrindFunction · 0.85
FUZZ_TARGET_INITFunction · 0.85
submitheaderFunction · 0.85

Calls 2

IsHexFunction · 0.85
ParseHexFunction · 0.85

Tested by 1

FUZZ_TARGET_INITFunction · 0.68