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

Function DecodeHexBlk

src/core_read.cpp:110–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110bool DecodeHexBlk(CBlock& block, const std::string& strHexBlk)
111{
112 if (!IsHex(strHexBlk))
113 return false;
114
115 std::vector<unsigned char> blockData(ParseHex(strHexBlk));
116 CDataStream ssBlock(blockData, SER_NETWORK, PROTOCOL_VERSION);
117 try {
118 ssBlock >> block;
119 }
120 catch (const std::exception&) {
121 return false;
122 }
123
124 return true;
125}
126
127uint256 ParseHashUV(const UniValue& v, const string& strName)
128{

Callers 2

getblocktemplateFunction · 0.85
submitblockFunction · 0.85

Calls 2

IsHexFunction · 0.85
ParseHexFunction · 0.85

Tested by

no test coverage detected