From d35ec902f476dd9c512272d4a7dbf6d0dbcf2ee7 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Fri, 18 Oct 2019 13:27:26 +0200 Subject: [PATCH] elements: Work around libwally getting upset with helpful flags libwally really is pedantic about the kind of hints it will accept. Signed-off-by: Christian Decker <@cdecker> --- bitcoin/tx.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/bitcoin/tx.c b/bitcoin/tx.c index 0c27e89cf..1e4bf6eac 100644 --- a/bitcoin/tx.c +++ b/bitcoin/tx.c @@ -159,10 +159,6 @@ bool bitcoin_tx_check(const struct bitcoin_tx *tx) if (wally_tx_get_length(tx->wtx, flags, &written) != WALLY_OK) return false; - if (chainparams->is_elements) { - flags |= WALLY_TX_FLAG_USE_ELEMENTS; - } - newtx = tal_arr(tmpctx, u8, written); if (wally_tx_to_bytes(tx->wtx, flags, newtx, written, &written) != WALLY_OK) @@ -319,10 +315,7 @@ static void push_tx(const struct bitcoin_tx *tx, if (bip144 && uses_witness(tx)) flag |= WALLY_TX_FLAG_USE_WITNESS; - if (chainparams->is_elements) - flag |= WALLY_TX_FLAG_USE_ELEMENTS; - - res = wally_tx_get_length(tx->wtx, flag & WALLY_TX_FLAG_USE_WITNESS, &len); + res = wally_tx_get_length(tx->wtx, flag, &len); assert(res == WALLY_OK); serialized = tal_arr(tmpctx, u8, len);