| 91 | } |
| 92 | |
| 93 | bool 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 | |
| 110 | bool DecodeHexBlk(CBlock& block, const std::string& strHexBlk) |
| 111 | { |
no test coverage detected