Skip to content

Commit 14aacf5

Browse files
benthecarmanclaude
andcommitted
Replace funding_redeem_script with output script
Expose the funding output's scriptPubKey on ChannelDetails as funding_output_script instead of the witness script. An output script stays meaningful for future taproot channels, where there is no witness script to expose, while a redeem script does not. The field was added after the last release, so no compatibility note is needed. This commit was written with the help of an AI tool. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
1 parent c54d971 commit 14aacf5

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/types.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -457,15 +457,15 @@ pub struct ChannelDetails {
457457
/// state until the splice transaction reaches sufficient confirmations to be locked (and we
458458
/// exchange `splice_locked` messages with our peer).
459459
pub funding_txo: Option<OutPoint>,
460-
/// The witness script that is used to lock the channel's funding output to commitment transactions.
460+
/// The output script (`scriptPubKey`) of the channel's funding output.
461461
///
462462
/// This field will be `None` if we have not negotiated the funding transaction with our
463463
/// counterparty already.
464464
///
465465
/// When a channel is spliced, this continues to refer to the original pre-splice channel
466466
/// state until the splice transaction reaches sufficient confirmations to be locked (and we
467467
/// exchange `splice_locked` messages with our peer).
468-
pub funding_redeem_script: Option<ScriptBuf>,
468+
pub funding_output_script: Option<ScriptBuf>,
469469
/// The position of the funding transaction in the chain. None if the funding transaction has
470470
/// not yet been confirmed and the channel fully opened.
471471
///
@@ -629,6 +629,8 @@ impl ChannelDetails {
629629
}
630630
});
631631

632+
let funding_output_script = value.get_funding_output().map(|o| o.script_pubkey);
633+
632634
ChannelDetails {
633635
channel_id: value.channel_id,
634636
counterparty: ChannelCounterparty {
@@ -640,7 +642,7 @@ impl ChannelDetails {
640642
outbound_htlc_maximum_msat: value.counterparty.outbound_htlc_maximum_msat,
641643
},
642644
funding_txo: value.funding_txo.map(|o| o.into_bitcoin_outpoint()),
643-
funding_redeem_script: value.funding_redeem_script,
645+
funding_output_script,
644646
short_channel_id: value.short_channel_id,
645647
outbound_scid_alias: value.outbound_scid_alias,
646648
inbound_scid_alias: value.inbound_scid_alias,

0 commit comments

Comments
 (0)