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

Function bitcoin_txid_to_hex

bitcoin/tx.c:663–669  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

661}
662
663bool bitcoin_txid_to_hex(const struct bitcoin_txid *txid,
664 char *hexstr, size_t hexstr_len)
665{
666 struct sha256_double rev = txid->shad;
667 reverse_bytes(rev.sha.u.u8, sizeof(rev.sha.u.u8));
668 return hex_encode(&rev, sizeof(rev), hexstr, hexstr_len);
669}
670
671static char *fmt_bitcoin_tx(const tal_t *ctx, const struct bitcoin_tx *tx)
672{

Callers 5

fmt_bitcoin_txidFunction · 0.85
bitcoin_blkid_to_hexFunction · 0.85
json_add_txidFunction · 0.85
json_add_outpointFunction · 0.85
mainFunction · 0.85

Calls 2

reverse_bytesFunction · 0.85
hex_encodeFunction · 0.85

Tested by

no test coverage detected