Skip to content

Commit d35ec90

Browse files
cdeckerniftynei
authored andcommitted
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>
1 parent 3c3d7e2 commit d35ec90

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

bitcoin/tx.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,6 @@ bool bitcoin_tx_check(const struct bitcoin_tx *tx)
159159
if (wally_tx_get_length(tx->wtx, flags, &written) != WALLY_OK)
160160
return false;
161161

162-
if (chainparams->is_elements) {
163-
flags |= WALLY_TX_FLAG_USE_ELEMENTS;
164-
}
165-
166162
newtx = tal_arr(tmpctx, u8, written);
167163
if (wally_tx_to_bytes(tx->wtx, flags, newtx, written, &written) !=
168164
WALLY_OK)
@@ -319,10 +315,7 @@ static void push_tx(const struct bitcoin_tx *tx,
319315
if (bip144 && uses_witness(tx))
320316
flag |= WALLY_TX_FLAG_USE_WITNESS;
321317

322-
if (chainparams->is_elements)
323-
flag |= WALLY_TX_FLAG_USE_ELEMENTS;
324-
325-
res = wally_tx_get_length(tx->wtx, flag & WALLY_TX_FLAG_USE_WITNESS, &len);
318+
res = wally_tx_get_length(tx->wtx, flag, &len);
326319
assert(res == WALLY_OK);
327320
serialized = tal_arr(tmpctx, u8, len);
328321

0 commit comments

Comments
 (0)