@@ -27,6 +27,7 @@ use bitcoin::secp256k1;
27
27
28
28
use crate::ln::types::{ChannelId, PaymentPreimage, PaymentHash};
29
29
use crate::ln::features::{ChannelTypeFeatures, InitFeatures};
30
+ use crate::ln::interactivetxs::InteractiveTxConstructor;
30
31
use crate::ln::msgs;
31
32
use crate::ln::msgs::DecodeError;
32
33
use crate::ln::script::{self, ShutdownScript};
@@ -3624,6 +3625,8 @@ pub(super) struct DualFundingChannelContext {
3624
3625
pub(super) struct Channel<SP: Deref> where SP::Target: SignerProvider {
3625
3626
pub context: ChannelContext<SP>,
3626
3627
pub dual_funding_channel_context: Option<DualFundingChannelContext>,
3628
+ /// The current interactive transaction construction session under negotiation.
3629
+ interactive_tx_constructor: Option<InteractiveTxConstructor>,
3627
3630
}
3628
3631
3629
3632
#[cfg(any(test, fuzzing))]
@@ -7724,6 +7727,7 @@ impl<SP: Deref> OutboundV1Channel<SP> where SP::Target: SignerProvider {
7724
7727
let mut channel = Channel {
7725
7728
context: self.context,
7726
7729
dual_funding_channel_context: None,
7730
+ interactive_tx_constructor: None,
7727
7731
};
7728
7732
7729
7733
let need_channel_ready = channel.check_get_channel_ready(0, logger).is_some();
@@ -7832,7 +7836,7 @@ impl<SP: Deref> InboundV1Channel<SP> where SP::Target: SignerProvider {
7832
7836
msg.push_msat,
7833
7837
msg.common_fields.clone(),
7834
7838
)?,
7835
- unfunded_context: UnfundedChannelContext { unfunded_channel_age_ticks: 0 }
7839
+ unfunded_context: UnfundedChannelContext { unfunded_channel_age_ticks: 0 },
7836
7840
};
7837
7841
Ok(chan)
7838
7842
}
@@ -8014,6 +8018,7 @@ impl<SP: Deref> InboundV1Channel<SP> where SP::Target: SignerProvider {
8014
8018
let mut channel = Channel {
8015
8019
context: self.context,
8016
8020
dual_funding_channel_context: None,
8021
+ interactive_tx_constructor: None,
8017
8022
};
8018
8023
let need_channel_ready = channel.check_get_channel_ready(0, logger).is_some();
8019
8024
channel.monitor_updating_paused(false, false, need_channel_ready, Vec::new(), Vec::new(), Vec::new());
@@ -8027,6 +8032,8 @@ pub(super) struct OutboundV2Channel<SP: Deref> where SP::Target: SignerProvider
8027
8032
pub context: ChannelContext<SP>,
8028
8033
pub unfunded_context: UnfundedChannelContext,
8029
8034
pub dual_funding_context: DualFundingChannelContext,
8035
+ /// The current interactive transaction construction session under negotiation.
8036
+ interactive_tx_constructor: Option<InteractiveTxConstructor>,
8030
8037
}
8031
8038
8032
8039
impl<SP: Deref> OutboundV2Channel<SP> where SP::Target: SignerProvider {
@@ -8076,7 +8083,8 @@ impl<SP: Deref> OutboundV2Channel<SP> where SP::Target: SignerProvider {
8076
8083
their_funding_satoshis: 0,
8077
8084
funding_tx_locktime,
8078
8085
funding_feerate_sat_per_1000_weight,
8079
- }
8086
+ },
8087
+ interactive_tx_constructor: None,
8080
8088
};
8081
8089
Ok(chan)
8082
8090
}
@@ -8148,6 +8156,8 @@ pub(super) struct InboundV2Channel<SP: Deref> where SP::Target: SignerProvider {
8148
8156
pub context: ChannelContext<SP>,
8149
8157
pub unfunded_context: UnfundedChannelContext,
8150
8158
pub dual_funding_context: DualFundingChannelContext,
8159
+ /// The current interactive transaction construction session under negotiation.
8160
+ interactive_tx_constructor: Option<InteractiveTxConstructor>,
8151
8161
}
8152
8162
8153
8163
impl<SP: Deref> InboundV2Channel<SP> where SP::Target: SignerProvider {
@@ -8219,7 +8229,8 @@ impl<SP: Deref> InboundV2Channel<SP> where SP::Target: SignerProvider {
8219
8229
their_funding_satoshis: msg.common_fields.funding_satoshis,
8220
8230
funding_tx_locktime: msg.locktime,
8221
8231
funding_feerate_sat_per_1000_weight: msg.funding_feerate_sat_per_1000_weight,
8222
- }
8232
+ },
8233
+ interactive_tx_constructor: None,
8223
8234
};
8224
8235
8225
8236
Ok(chan)
@@ -9344,6 +9355,7 @@ impl<'a, 'b, 'c, ES: Deref, SP: Deref> ReadableArgs<(&'a ES, &'b SP, u32, &'c Ch
9344
9355
blocked_monitor_updates: blocked_monitor_updates.unwrap(),
9345
9356
},
9346
9357
dual_funding_channel_context: None,
9358
+ interactive_tx_constructor: None,
9347
9359
})
9348
9360
}
9349
9361
}
0 commit comments