| 962 | } |
| 963 | |
| 964 | struct wally_psbt *fromwire_wally_psbt(const tal_t *ctx, |
| 965 | const u8 **cursor, size_t *max) |
| 966 | { |
| 967 | struct wally_psbt *psbt; |
| 968 | u32 psbt_byte_len; |
| 969 | const u8 *psbt_buf; |
| 970 | |
| 971 | psbt_byte_len = fromwire_u32(cursor, max); |
| 972 | psbt_buf = fromwire(cursor, max, NULL, psbt_byte_len); |
| 973 | if (!psbt_buf || psbt_byte_len == 0) |
| 974 | return NULL; |
| 975 | |
| 976 | psbt = psbt_from_bytes(ctx, psbt_buf, psbt_byte_len); |
| 977 | if (!psbt) |
| 978 | return fromwire_fail(cursor, max); |
| 979 | |
| 980 | /* Internally we always operate on v2 */ |
| 981 | psbt_set_version(psbt, 2); |
| 982 | |
| 983 | return psbt; |
| 984 | } |
| 985 | |
| 986 | void psbt_txid(const tal_t *ctx, |
| 987 | const struct wally_psbt *psbt, |
no test coverage detected