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

Function init_psbt

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

Source from the content-addressed store, hash-verified

18}
19
20static struct wally_psbt *init_psbt(const tal_t *ctx, size_t num_inputs, size_t num_outputs)
21{
22 int wally_err;
23 struct wally_psbt *psbt;
24
25 tal_wally_start();
26 if (is_elements(chainparams))
27 wally_err = wally_psbt_elements_init_alloc(0, num_inputs, num_outputs, 0, &psbt);
28 else
29 wally_err = wally_psbt_init_alloc(0, num_inputs, num_outputs, 0, &psbt);
30 assert(wally_err == WALLY_OK);
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 *create_psbt(const tal_t *ctx, size_t num_inputs, size_t num_outputs, u32 locktime)
38{

Callers 2

create_psbtFunction · 0.85
new_psbtFunction · 0.85

Calls 2

tal_wally_startFunction · 0.85
is_elementsFunction · 0.85

Tested by

no test coverage detected