mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 07:34:24 +01:00
commit_tx: free temporary wscript, rather than leaving attached to tx.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -203,7 +203,7 @@ struct bitcoin_tx *create_commit_tx(const tal_t *ctx,
|
|||||||
|
|
||||||
if (!htlc_has(h, committed_flag))
|
if (!htlc_has(h, committed_flag))
|
||||||
continue;
|
continue;
|
||||||
wscript = wscript_for_htlc(tx, peer, h, rhash, side);
|
wscript = wscript_for_htlc(tmpctx, peer, h, rhash, side);
|
||||||
/* If we pay any HTLC, it's txout is not just to other side. */
|
/* If we pay any HTLC, it's txout is not just to other side. */
|
||||||
if (add_output(tx, scriptpubkey_p2wsh(tmpctx, wscript),
|
if (add_output(tx, scriptpubkey_p2wsh(tmpctx, wscript),
|
||||||
h->msatoshi / 1000, &total)) {
|
h->msatoshi / 1000, &total)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user