From de854fa9d4e9d6438ada357dababcd72d295af77 Mon Sep 17 00:00:00 2001 From: niftynei Date: Mon, 26 Apr 2021 12:00:37 -0500 Subject: [PATCH] psbt: really hacky patch over libwally's 0-input txs parse fail Issue being tracked at https://github.com/ElementsProject/libwally-core/pull/273 --- bitcoin/psbt.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bitcoin/psbt.c b/bitcoin/psbt.c index 249f1acda..c3f294e39 100644 --- a/bitcoin/psbt.c +++ b/bitcoin/psbt.c @@ -688,6 +688,11 @@ struct wally_psbt *psbt_from_b64(const tal_t *ctx, else psbt = NULL; tal_wally_end(tal_steal(ctx, psbt)); + + /* FIXME: Patch for the empty-tx bug in libwally */ + if (!psbt && strlen(str) == 28) + psbt = create_psbt(ctx, 0, 0, 0); + return psbt; }