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

Function create_psbt

bitcoin/psbt.c:19–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17}
18
19struct wally_psbt *create_psbt(const tal_t *ctx, size_t num_inputs, size_t num_outputs, u32 locktime)
20{
21 const u32 init_flags = is_elements(chainparams) ? WALLY_PSBT_INIT_PSET : 0;
22 struct wally_psbt *psbt;
23 int wally_err;
24
25 tal_wally_start();
26 wally_err = wally_psbt_init_alloc(2, num_inputs, num_outputs, 0, init_flags, &psbt);
27 assert(wally_err == WALLY_OK);
28 wally_psbt_set_fallback_locktime(psbt, locktime);
29 /* By default we are modifying them internally; allow it */
30 wally_psbt_set_tx_modifiable_flags(psbt, WALLY_PSBT_TXMOD_INPUTS | WALLY_PSBT_TXMOD_OUTPUTS);
31 tal_add_destructor(psbt, psbt_destroy);
32 tal_wally_end_onto(ctx, psbt, struct wally_psbt);
33
34 return psbt;
35}
36
37struct wally_psbt *clone_psbt(const tal_t *ctx, const struct wally_psbt *psbt)
38{

Callers 15

new_psbtFunction · 0.85
psbt_using_utxosFunction · 0.85
json_addpsbtoutputFunction · 0.85
json_addpsbtinputFunction · 0.85
splice_initiatorFunction · 0.85
json_queryratesFunction · 0.85
json_splice_initFunction · 0.85
linearize_inputFunction · 0.85
linearize_outputFunction · 0.85
change_serialsFunction · 0.85
mainFunction · 0.85

Calls 2

is_elementsFunction · 0.85
tal_wally_startFunction · 0.85

Tested by 2

change_serialsFunction · 0.68
mainFunction · 0.68