17 const std::string tx_hex =
HexStr(buffer);
19 const bool result_none =
DecodeHexTx(mtx, tx_hex,
false,
false);
20 const bool result_try_witness =
DecodeHexTx(mtx, tx_hex,
false,
true);
21 const bool result_try_witness_and_maybe_no_witness =
DecodeHexTx(mtx, tx_hex,
true,
true);
23 const bool result_try_no_witness =
DecodeHexTx(no_witness_mtx, tx_hex,
true,
false);
25 if (result_try_witness_and_maybe_no_witness) {
26 assert(result_try_no_witness || result_try_witness);
28 if (result_try_no_witness) {
30 assert(result_try_witness_and_maybe_no_witness);
bool DecodeHexTx(CMutableTransaction &tx, const std::string &hex_tx, bool try_no_witness=false, bool try_witness=true)
std::string HexStr(const Span< const uint8_t > s)
Convert a span of bytes to a lower-case hexadecimal string.
A mutable version of CTransaction.