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

Function create_psbt

bitcoin/psbt.c:37–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37struct wally_psbt *create_psbt(const tal_t *ctx, size_t num_inputs, size_t num_outputs, u32 locktime)
38{
39 int wally_err;
40 struct wally_tx *wtx;
41 struct wally_psbt *psbt;
42
43 tal_wally_start();
44 if (wally_tx_init_alloc(WALLY_TX_VERSION_2, locktime, num_inputs, num_outputs, &wtx) != WALLY_OK)
45 abort();
46 /* wtx is freed below */
47 tal_wally_end(NULL);
48
49 psbt = init_psbt(ctx, num_inputs, num_outputs);
50
51 tal_wally_start();
52 wally_err = wally_psbt_set_global_tx(psbt, wtx);
53 assert(wally_err == WALLY_OK);
54 tal_wally_end(psbt);
55
56 wally_tx_free(wtx);
57 return psbt;
58}
59
60struct wally_psbt *clone_psbt(const tal_t *ctx, struct wally_psbt *psbt)
61{

Callers 9

psbt_using_utxosFunction · 0.85
json_queryratesFunction · 0.85
linearize_inputFunction · 0.85
linearize_outputFunction · 0.85
change_serialsFunction · 0.85
mainFunction · 0.85
init_changesetFunction · 0.85
accepter_startFunction · 0.85
rbf_remote_startFunction · 0.85

Calls 4

tal_wally_startFunction · 0.85
abortFunction · 0.85
tal_wally_endFunction · 0.85
init_psbtFunction · 0.85

Tested by 2

change_serialsFunction · 0.68
mainFunction · 0.68