MCPcopy Create free account
hub / github.com/ElementsProject/lightning / bitcoin_blkid_from_hex

Function bitcoin_blkid_from_hex

bitcoin/block.c:231–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

229}
230
231bool 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
240bool bitcoin_blkid_to_hex(const struct bitcoin_blkid *blkid,
241 char *hexstr, size_t hexstr_len)

Callers 2

mainFunction · 0.85
json_to_bitcoin_blkidFunction · 0.85

Calls 2

hex_decodeFunction · 0.85
reverse_bytesFunction · 0.85

Tested by 1

mainFunction · 0.68