|
|
@ -60,15 +60,12 @@ struct wally_psbt *new_psbt(const tal_t *ctx, const struct wally_tx *wtx) |
|
|
|
return tal_steal(ctx, psbt); |
|
|
|
} |
|
|
|
|
|
|
|
bool psbt_is_finalized(struct wally_psbt *psbt) |
|
|
|
bool psbt_is_finalized(const struct wally_psbt *psbt) |
|
|
|
{ |
|
|
|
for (size_t i = 0; i < psbt->num_inputs; i++) { |
|
|
|
if (!psbt->inputs[i].final_scriptsig && |
|
|
|
!psbt->inputs[i].final_witness) |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
return true; |
|
|
|
size_t is_finalized; |
|
|
|
int wally_err = wally_psbt_is_finalized(psbt, &is_finalized); |
|
|
|
assert(wally_err == WALLY_OK); |
|
|
|
return is_finalized ? true : false; |
|
|
|
} |
|
|
|
|
|
|
|
struct wally_psbt_input *psbt_add_input(struct wally_psbt *psbt, |
|
|
|