|
@ -17,6 +17,18 @@ |
|
|
memmove((arr) + (pos), (arr) + (pos) + 1, \ |
|
|
memmove((arr) + (pos), (arr) + (pos) + 1, \ |
|
|
sizeof(*(arr)) * ((num) - ((pos) + 1))) |
|
|
sizeof(*(arr)) * ((num) - ((pos) + 1))) |
|
|
|
|
|
|
|
|
|
|
|
/* FIXME: someday this will break, because it's been exposed in libwally */ |
|
|
|
|
|
int wally_psbt_clone(const struct wally_psbt *psbt, struct wally_psbt **output) |
|
|
|
|
|
{ |
|
|
|
|
|
int ret; |
|
|
|
|
|
size_t byte_len; |
|
|
|
|
|
const u8 *bytes = psbt_get_bytes(NULL, psbt, &byte_len); |
|
|
|
|
|
|
|
|
|
|
|
ret = wally_psbt_from_bytes(bytes, byte_len, output); |
|
|
|
|
|
tal_free(bytes); |
|
|
|
|
|
return ret; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
void psbt_destroy(struct wally_psbt *psbt) |
|
|
void psbt_destroy(struct wally_psbt *psbt) |
|
|
{ |
|
|
{ |
|
|
wally_psbt_free(psbt); |
|
|
wally_psbt_free(psbt); |
|
|