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

Function linearize_wtx

bitcoin/tx.c:440–457  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

438}
439
440u8 *linearize_wtx(const tal_t *ctx, const struct wally_tx *wtx)
441{
442 u8 *arr;
443 u32 flag = 0;
444 size_t len, written;
445 int res;
446
447 if (uses_witness(wtx))
448 flag |= WALLY_TX_FLAG_USE_WITNESS;
449
450 res = wally_tx_get_length(wtx, flag, &len);
451 assert(res == WALLY_OK);
452 arr = tal_arr(ctx, u8, len);
453 res = wally_tx_to_bytes(wtx, flag, arr, len, &written);
454 assert(len == written);
455
456 return arr;
457}
458
459size_t wally_tx_weight(const struct wally_tx *wtx)
460{

Callers 14

linearize_txFunction · 0.85
fmt_wally_txFunction · 0.85
sendpsbt_doneFunction · 0.85
json_dev_finalizepsbtFunction · 0.85
json_sendpsbtFunction · 0.85
handle_tx_broadcastFunction · 0.85
send_funding_txFunction · 0.85
send_nextFunction · 0.85
sendpsbt_doneFunction · 0.85
finish_txprepareFunction · 0.85
unreserve_doneFunction · 0.85

Calls 1

uses_witnessFunction · 0.85

Tested by

no test coverage detected