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

Function linearize_wtx

bitcoin/tx.c:428–445  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

426}
427
428u8 *linearize_wtx(const tal_t *ctx, const struct wally_tx *wtx)
429{
430 u8 *arr;
431 u32 flag = 0;
432 size_t len, written;
433 int res;
434
435 if (uses_witness(wtx))
436 flag |= WALLY_TX_FLAG_USE_WITNESS;
437
438 res = wally_tx_get_length(wtx, flag, &len);
439 assert(res == WALLY_OK);
440 arr = tal_arr(ctx, u8, len);
441 res = wally_tx_to_bytes(wtx, flag, arr, len, &written);
442 assert(len == written);
443
444 return arr;
445}
446
447size_t wally_tx_weight(const struct wally_tx *wtx)
448{

Callers 12

linearize_txFunction · 0.85
fmt_wally_txFunction · 0.85
sendpsbt_doneFunction · 0.85
json_sendpsbtFunction · 0.85
handle_tx_broadcastFunction · 0.85
send_funding_txFunction · 0.85
sendpsbt_doneFunction · 0.85
signpsbt_doneFunction · 0.85
finish_txprepareFunction · 0.85
unreserve_doneFunction · 0.85
psbt_changeset_get_nextFunction · 0.85
db_bind_txFunction · 0.85

Calls 1

uses_witnessFunction · 0.85

Tested by

no test coverage detected