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

Function DecodeHexTx

src/core_read.cpp:93–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93bool DecodeHexTx(CTransaction& tx, const std::string& strHexTx)
94{
95 if (!IsHex(strHexTx))
96 return false;
97
98 vector<unsigned char> txData(ParseHex(strHexTx));
99 CDataStream ssData(txData, SER_NETWORK, PROTOCOL_VERSION);
100 try {
101 ssData >> tx;
102 }
103 catch (const std::exception&) {
104 return false;
105 }
106
107 return true;
108}
109
110bool DecodeHexBlk(CBlock& block, const std::string& strHexBlk)
111{

Callers 3

CommandLineRawTxFunction · 0.85
decoderawtransactionFunction · 0.85
sendrawtransactionFunction · 0.85

Calls 2

IsHexFunction · 0.85
ParseHexFunction · 0.85

Tested by

no test coverage detected