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

Function DecodeHexBlk

src/core_read.cpp:223–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

221}
222
223bool DecodeHexBlk(CBlock& block, const std::string& strHexBlk)
224{
225 if (!IsHex(strHexBlk))
226 return false;
227
228 std::vector<unsigned char> blockData(ParseHex(strHexBlk));
229 CDataStream ssBlock(blockData, SER_NETWORK, PROTOCOL_VERSION);
230 try {
231 ssBlock >> block;
232 }
233 catch (const std::exception&) {
234 return false;
235 }
236
237 return true;
238}
239
240bool ParseHashStr(const std::string& strHex, uint256& result)
241{

Callers 7

signblockFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
FUZZ_TARGET_INITFunction · 0.85
getblocktemplateFunction · 0.85
submitblockFunction · 0.85
combineblocksigsFunction · 0.85
testproposedblockFunction · 0.85

Calls 2

IsHexFunction · 0.85
ParseHexFunction · 0.85

Tested by 2

BOOST_AUTO_TEST_CASEFunction · 0.68
FUZZ_TARGET_INITFunction · 0.68