@@ -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};
@@ -3694,6 +3695,8 @@ pub(super) struct DualFundingChannelContext {
36943695pub(super) struct Channel<SP: Deref> where SP::Target: SignerProvider {
36953696 pub context: ChannelContext<SP>,
36963697 pub dual_funding_channel_context: Option<DualFundingChannelContext>,
3698+ /// The current interactive transaction construction session under negotiation.
3699+ interactive_tx_constructor: Option<InteractiveTxConstructor>,
36973700}
36983701
36993702#[cfg(any(test, fuzzing))]
@@ -7926,6 +7929,7 @@ impl<SP: Deref> OutboundV1Channel<SP> where SP::Target: SignerProvider {
79267929 let mut channel = Channel {
79277930 context: self.context,
79287931 dual_funding_channel_context: None,
7932+ interactive_tx_constructor: None,
79297933 };
79307934
79317935 let need_channel_ready = channel.check_get_channel_ready(0, logger).is_some();
@@ -8034,7 +8038,7 @@ impl<SP: Deref> InboundV1Channel<SP> where SP::Target: SignerProvider {
80348038 msg.push_msat,
80358039 msg.common_fields.clone(),
80368040 )?,
8037- unfunded_context: UnfundedChannelContext { unfunded_channel_age_ticks: 0 }
8041+ unfunded_context: UnfundedChannelContext { unfunded_channel_age_ticks: 0 },
80388042 };
80398043 Ok(chan)
80408044 }
@@ -8223,6 +8227,7 @@ impl<SP: Deref> InboundV1Channel<SP> where SP::Target: SignerProvider {
82238227 let mut channel = Channel {
82248228 context: self.context,
82258229 dual_funding_channel_context: None,
8230+ interactive_tx_constructor: None,
82268231 };
82278232 let need_channel_ready = channel.check_get_channel_ready(0, logger).is_some();
82288233 channel.monitor_updating_paused(false, false, need_channel_ready, Vec::new(), Vec::new(), Vec::new());
@@ -8236,6 +8241,8 @@ pub(super) struct OutboundV2Channel<SP: Deref> where SP::Target: SignerProvider
82368241 pub context: ChannelContext<SP>,
82378242 pub unfunded_context: UnfundedChannelContext,
82388243 pub dual_funding_context: DualFundingChannelContext,
8244+ /// The current interactive transaction construction session under negotiation.
8245+ interactive_tx_constructor: Option<InteractiveTxConstructor>,
82398246}
82408247
82418248impl<SP: Deref> OutboundV2Channel<SP> where SP::Target: SignerProvider {
@@ -8287,7 +8294,8 @@ impl<SP: Deref> OutboundV2Channel<SP> where SP::Target: SignerProvider {
82878294 their_funding_satoshis: 0,
82888295 funding_tx_locktime,
82898296 funding_feerate_sat_per_1000_weight,
8290- }
8297+ },
8298+ interactive_tx_constructor: None,
82918299 };
82928300 Ok(chan)
82938301 }
@@ -8361,6 +8369,8 @@ pub(super) struct InboundV2Channel<SP: Deref> where SP::Target: SignerProvider {
83618369 pub context: ChannelContext<SP>,
83628370 pub unfunded_context: UnfundedChannelContext,
83638371 pub dual_funding_context: DualFundingChannelContext,
8372+ /// The current interactive transaction construction session under negotiation.
8373+ interactive_tx_constructor: Option<InteractiveTxConstructor>,
83648374}
83658375
83668376impl<SP: Deref> InboundV2Channel<SP> where SP::Target: SignerProvider {
@@ -8432,7 +8442,8 @@ impl<SP: Deref> InboundV2Channel<SP> where SP::Target: SignerProvider {
84328442 their_funding_satoshis: msg.common_fields.funding_satoshis,
84338443 funding_tx_locktime: msg.locktime,
84348444 funding_feerate_sat_per_1000_weight: msg.funding_feerate_sat_per_1000_weight,
8435- }
8445+ },
8446+ interactive_tx_constructor: None,
84368447 };
84378448
84388449 Ok(chan)
@@ -9574,6 +9585,7 @@ impl<'a, 'b, 'c, ES: Deref, SP: Deref> ReadableArgs<(&'a ES, &'b SP, u32, &'c Ch
95749585 is_manual_broadcast: is_manual_broadcast.unwrap_or(false),
95759586 },
95769587 dual_funding_channel_context: None,
9588+ interactive_tx_constructor: None,
95779589 })
95789590 }
95799591}
0 commit comments