@@ -27,6 +27,7 @@ use bitcoin::secp256k1;
2727
2828use crate::ln::types::{ChannelId, PaymentPreimage, PaymentHash};
2929use crate::ln::features::{ChannelTypeFeatures, InitFeatures};
30+ use crate::ln::interactivetxs::InteractiveTxConstructor;
3031use crate::ln::msgs;
3132use crate::ln::msgs::{ClosingSigned, ClosingSignedFeeRange, DecodeError};
3233use crate::ln::script::{self, ShutdownScript};
@@ -3834,6 +3835,8 @@ pub(super) struct DualFundingChannelContext {
38343835pub(super) struct Channel<SP: Deref> where SP::Target: SignerProvider {
38353836 pub context: ChannelContext<SP>,
38363837 pub dual_funding_channel_context: Option<DualFundingChannelContext>,
3838+ /// The current interactive transaction construction session under negotiation.
3839+ interactive_tx_constructor: Option<InteractiveTxConstructor>,
38373840}
38383841
38393842#[cfg(any(test, fuzzing))]
@@ -8013,6 +8016,7 @@ impl<SP: Deref> OutboundV1Channel<SP> where SP::Target: SignerProvider {
80138016 let mut channel = Channel {
80148017 context: self.context,
80158018 dual_funding_channel_context: None,
8019+ interactive_tx_constructor: None,
80168020 };
80178021
80188022 let need_channel_ready = channel.check_get_channel_ready(0, logger).is_some();
@@ -8121,7 +8125,7 @@ impl<SP: Deref> InboundV1Channel<SP> where SP::Target: SignerProvider {
81218125 msg.push_msat,
81228126 msg.common_fields.clone(),
81238127 )?,
8124- unfunded_context: UnfundedChannelContext { unfunded_channel_age_ticks: 0 }
8128+ unfunded_context: UnfundedChannelContext { unfunded_channel_age_ticks: 0 },
81258129 };
81268130 Ok(chan)
81278131 }
@@ -8247,6 +8251,7 @@ impl<SP: Deref> InboundV1Channel<SP> where SP::Target: SignerProvider {
82478251 let mut channel = Channel {
82488252 context: self.context,
82498253 dual_funding_channel_context: None,
8254+ interactive_tx_constructor: None,
82508255 };
82518256 let need_channel_ready = channel.check_get_channel_ready(0, logger).is_some();
82528257 channel.monitor_updating_paused(false, false, need_channel_ready, Vec::new(), Vec::new(), Vec::new());
@@ -8260,6 +8265,8 @@ pub(super) struct OutboundV2Channel<SP: Deref> where SP::Target: SignerProvider
82608265 pub context: ChannelContext<SP>,
82618266 pub unfunded_context: UnfundedChannelContext,
82628267 pub dual_funding_context: DualFundingChannelContext,
8268+ /// The current interactive transaction construction session under negotiation.
8269+ interactive_tx_constructor: Option<InteractiveTxConstructor>,
82638270}
82648271
82658272impl<SP: Deref> OutboundV2Channel<SP> where SP::Target: SignerProvider {
@@ -8311,7 +8318,8 @@ impl<SP: Deref> OutboundV2Channel<SP> where SP::Target: SignerProvider {
83118318 their_funding_satoshis: 0,
83128319 funding_tx_locktime,
83138320 funding_feerate_sat_per_1000_weight,
8314- }
8321+ },
8322+ interactive_tx_constructor: None,
83158323 };
83168324 Ok(chan)
83178325 }
@@ -8385,6 +8393,8 @@ pub(super) struct InboundV2Channel<SP: Deref> where SP::Target: SignerProvider {
83858393 pub context: ChannelContext<SP>,
83868394 pub unfunded_context: UnfundedChannelContext,
83878395 pub dual_funding_context: DualFundingChannelContext,
8396+ /// The current interactive transaction construction session under negotiation.
8397+ interactive_tx_constructor: Option<InteractiveTxConstructor>,
83888398}
83898399
83908400impl<SP: Deref> InboundV2Channel<SP> where SP::Target: SignerProvider {
@@ -8456,7 +8466,8 @@ impl<SP: Deref> InboundV2Channel<SP> where SP::Target: SignerProvider {
84568466 their_funding_satoshis: msg.common_fields.funding_satoshis,
84578467 funding_tx_locktime: msg.locktime,
84588468 funding_feerate_sat_per_1000_weight: msg.funding_feerate_sat_per_1000_weight,
8459- }
8469+ },
8470+ interactive_tx_constructor: None,
84608471 };
84618472
84628473 Ok(chan)
@@ -9598,6 +9609,7 @@ impl<'a, 'b, 'c, ES: Deref, SP: Deref> ReadableArgs<(&'a ES, &'b SP, u32, &'c Ch
95989609 is_manual_broadcast: is_manual_broadcast.unwrap_or(false),
95999610 },
96009611 dual_funding_channel_context: None,
9612+ interactive_tx_constructor: None,
96019613 })
96029614 }
96039615}
0 commit comments