mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-15 11:59:16 +01:00
init channel: only fill in wscript if requested
We don't actually use this internal to this method? Weird. Anyway, if we don't want/need it allow the caller to signal that by passing in NULL, if desired.
This commit is contained in:
parent
20c77419dc
commit
72e2e37222
1 changed files with 6 additions and 4 deletions
|
@ -119,10 +119,6 @@ struct bitcoin_tx *initial_channel_tx(const tal_t *ctx,
|
|||
channel->opener,
|
||||
side);
|
||||
|
||||
*wscript = bitcoin_redeem_2of2(ctx,
|
||||
&channel->funding_pubkey[side],
|
||||
&channel->funding_pubkey[!side]);
|
||||
|
||||
init_tx = initial_commit_tx(ctx, &channel->funding,
|
||||
channel->funding_sats,
|
||||
channel->funding_pubkey,
|
||||
|
@ -149,6 +145,12 @@ struct bitcoin_tx *initial_channel_tx(const tal_t *ctx,
|
|||
&channel->funding_pubkey[!side], false /* is_taproot */);
|
||||
}
|
||||
|
||||
if (wscript) {
|
||||
*wscript = bitcoin_redeem_2of2(ctx,
|
||||
&channel->funding_pubkey[side],
|
||||
&channel->funding_pubkey[!side]);
|
||||
}
|
||||
|
||||
return init_tx;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue