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

Function DecodeHexBlk

src/core_io.cpp:248–262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246}
247
248bool DecodeHexBlk(CBlock& block, const std::string& strHexBlk)
249{
250 if (!IsHex(strHexBlk))
251 return false;
252
253 std::vector<unsigned char> blockData(ParseHex(strHexBlk));
254 try {
255 SpanReader{blockData} >> TX_WITH_WITNESS(block);
256 }
257 catch (const std::exception&) {
258 return false;
259 }
260
261 return true;
262}
263
264util::Result<int> SighashFromStr(const std::string& sighash)
265{

Callers 4

BOOST_AUTO_TEST_CASEFunction · 0.85
FUZZ_TARGETFunction · 0.85
getblocktemplateFunction · 0.85
submitblockFunction · 0.85

Calls 2

IsHexFunction · 0.85
ParseHexFunction · 0.85

Tested by 2

BOOST_AUTO_TEST_CASEFunction · 0.68
FUZZ_TARGETFunction · 0.68