| 18 | } |
| 19 | |
| 20 | static 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 | |
| 37 | struct wally_psbt *create_psbt(const tal_t *ctx, size_t num_inputs, size_t num_outputs, u32 locktime) |
| 38 | { |
no test coverage detected