mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-07 23:24:21 +01:00
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>
This commit is contained in:
committed by
neil saitug
parent
3c3d7e2df4
commit
d35ec902f4
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user