@@ -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};
@@ -3690,6 +3691,8 @@ pub(super) struct DualFundingChannelContext {
36903691pub(super) struct Channel<SP: Deref> where SP::Target: SignerProvider {
36913692 pub context: ChannelContext<SP>,
36923693 pub dual_funding_channel_context: Option<DualFundingChannelContext>,
3694+ /// The current interactive transaction construction session under negotiation.
3695+ interactive_tx_constructor: Option<InteractiveTxConstructor>,
36933696}
36943697
36953698#[cfg(any(test, fuzzing))]
@@ -7921,6 +7924,7 @@ impl<SP: Deref> OutboundV1Channel<SP> where SP::Target: SignerProvider {
79217924 let mut channel = Channel {
79227925 context: self.context,
79237926 dual_funding_channel_context: None,
7927+ interactive_tx_constructor: None,
79247928 };
79257929
79267930 let need_channel_ready = channel.check_get_channel_ready(0, logger).is_some();
@@ -8029,7 +8033,7 @@ impl<SP: Deref> InboundV1Channel<SP> where SP::Target: SignerProvider {
80298033 msg.push_msat,
80308034 msg.common_fields.clone(),
80318035 )?,
8032- unfunded_context: UnfundedChannelContext { unfunded_channel_age_ticks: 0 }
8036+ unfunded_context: UnfundedChannelContext { unfunded_channel_age_ticks: 0 },
80338037 };
80348038 Ok(chan)
80358039 }
@@ -8218,6 +8222,7 @@ impl<SP: Deref> InboundV1Channel<SP> where SP::Target: SignerProvider {
82188222 let mut channel = Channel {
82198223 context: self.context,
82208224 dual_funding_channel_context: None,
8225+ interactive_tx_constructor: None,
82218226 };
82228227 let need_channel_ready = channel.check_get_channel_ready(0, logger).is_some();
82238228 channel.monitor_updating_paused(false, false, need_channel_ready, Vec::new(), Vec::new(), Vec::new());
@@ -8231,6 +8236,8 @@ pub(super) struct OutboundV2Channel<SP: Deref> where SP::Target: SignerProvider
82318236 pub context: ChannelContext<SP>,
82328237 pub unfunded_context: UnfundedChannelContext,
82338238 pub dual_funding_context: DualFundingChannelContext,
8239+ /// The current interactive transaction construction session under negotiation.
8240+ interactive_tx_constructor: Option<InteractiveTxConstructor>,
82348241}
82358242
82368243impl<SP: Deref> OutboundV2Channel<SP> where SP::Target: SignerProvider {
@@ -8282,7 +8289,8 @@ impl<SP: Deref> OutboundV2Channel<SP> where SP::Target: SignerProvider {
82828289 their_funding_satoshis: 0,
82838290 funding_tx_locktime,
82848291 funding_feerate_sat_per_1000_weight,
8285- }
8292+ },
8293+ interactive_tx_constructor: None,
82868294 };
82878295 Ok(chan)
82888296 }
@@ -8356,6 +8364,8 @@ pub(super) struct InboundV2Channel<SP: Deref> where SP::Target: SignerProvider {
83568364 pub context: ChannelContext<SP>,
83578365 pub unfunded_context: UnfundedChannelContext,
83588366 pub dual_funding_context: DualFundingChannelContext,
8367+ /// The current interactive transaction construction session under negotiation.
8368+ interactive_tx_constructor: Option<InteractiveTxConstructor>,
83598369}
83608370
83618371impl<SP: Deref> InboundV2Channel<SP> where SP::Target: SignerProvider {
@@ -8427,7 +8437,8 @@ impl<SP: Deref> InboundV2Channel<SP> where SP::Target: SignerProvider {
84278437 their_funding_satoshis: msg.common_fields.funding_satoshis,
84288438 funding_tx_locktime: msg.locktime,
84298439 funding_feerate_sat_per_1000_weight: msg.funding_feerate_sat_per_1000_weight,
8430- }
8440+ },
8441+ interactive_tx_constructor: None,
84318442 };
84328443
84338444 Ok(chan)
@@ -9569,6 +9580,7 @@ impl<'a, 'b, 'c, ES: Deref, SP: Deref> ReadableArgs<(&'a ES, &'b SP, u32, &'c Ch
95699580 is_manual_broadcast: is_manual_broadcast.unwrap_or(false),
95709581 },
95719582 dual_funding_channel_context: None,
9583+ interactive_tx_constructor: None,
95729584 })
95739585 }
95749586}
0 commit comments