| 693 | } |
| 694 | |
| 695 | bool bitcoin_txid_from_hex(const char *hexstr, size_t hexstr_len, |
| 696 | struct bitcoin_txid *txid) |
| 697 | { |
| 698 | if (!hex_decode(hexstr, hexstr_len, txid, sizeof(*txid))) |
| 699 | return false; |
| 700 | reverse_bytes(txid->shad.sha.u.u8, sizeof(txid->shad.sha.u.u8)); |
| 701 | return true; |
| 702 | } |
| 703 | |
| 704 | bool bitcoin_txid_to_hex(const struct bitcoin_txid *txid, |
| 705 | char *hexstr, size_t hexstr_len) |