| 229 | } |
| 230 | |
| 231 | bool bitcoin_blkid_from_hex(const char *hexstr, size_t hexstr_len, |
| 232 | struct bitcoin_blkid *blkid) |
| 233 | { |
| 234 | if (!hex_decode(hexstr, hexstr_len, blkid, sizeof(*blkid))) |
| 235 | return false; |
| 236 | reverse_bytes(blkid->shad.sha.u.u8, sizeof(blkid->shad.sha.u.u8)); |
| 237 | return true; |
| 238 | } |
| 239 | |
| 240 | bool bitcoin_blkid_to_hex(const struct bitcoin_blkid *blkid, |
| 241 | char *hexstr, size_t hexstr_len) |