@@ -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))]
@@ -7725,6 +7728,7 @@ impl<SP: Deref> OutboundV1Channel<SP> where SP::Target: SignerProvider {
7725
7728
let mut channel = Channel {
7726
7729
context: self.context,
7727
7730
dual_funding_channel_context: None,
7731
+ interactive_tx_constructor: None,
7728
7732
};
7729
7733
7730
7734
let need_channel_ready = channel.check_get_channel_ready(0, logger).is_some();
@@ -7833,7 +7837,7 @@ impl<SP: Deref> InboundV1Channel<SP> where SP::Target: SignerProvider {
7833
7837
msg.push_msat,
7834
7838
msg.common_fields.clone(),
7835
7839
)?,
7836
- unfunded_context: UnfundedChannelContext { unfunded_channel_age_ticks: 0 }
7840
+ unfunded_context: UnfundedChannelContext { unfunded_channel_age_ticks: 0 },
7837
7841
};
7838
7842
Ok(chan)
7839
7843
}
@@ -8015,6 +8019,7 @@ impl<SP: Deref> InboundV1Channel<SP> where SP::Target: SignerProvider {
8015
8019
let mut channel = Channel {
8016
8020
context: self.context,
8017
8021
dual_funding_channel_context: None,
8022
+ interactive_tx_constructor: None,
8018
8023
};
8019
8024
let need_channel_ready = channel.check_get_channel_ready(0, logger).is_some();
8020
8025
channel.monitor_updating_paused(false, false, need_channel_ready, Vec::new(), Vec::new(), Vec::new());
@@ -8028,6 +8033,8 @@ pub(super) struct OutboundV2Channel<SP: Deref> where SP::Target: SignerProvider
8028
8033
pub context: ChannelContext<SP>,
8029
8034
pub unfunded_context: UnfundedChannelContext,
8030
8035
pub dual_funding_context: DualFundingChannelContext,
8036
+ /// The current interactive transaction construction session under negotiation.
8037
+ interactive_tx_constructor: Option<InteractiveTxConstructor>,
8031
8038
}
8032
8039
8033
8040
impl<SP: Deref> OutboundV2Channel<SP> where SP::Target: SignerProvider {
@@ -8077,7 +8084,8 @@ impl<SP: Deref> OutboundV2Channel<SP> where SP::Target: SignerProvider {
8077
8084
their_funding_satoshis: 0,
8078
8085
funding_tx_locktime,
8079
8086
funding_feerate_sat_per_1000_weight,
8080
- }
8087
+ },
8088
+ interactive_tx_constructor: None,
8081
8089
};
8082
8090
Ok(chan)
8083
8091
}
@@ -8149,6 +8157,8 @@ pub(super) struct InboundV2Channel<SP: Deref> where SP::Target: SignerProvider {
8149
8157
pub context: ChannelContext<SP>,
8150
8158
pub unfunded_context: UnfundedChannelContext,
8151
8159
pub dual_funding_context: DualFundingChannelContext,
8160
+ /// The current interactive transaction construction session under negotiation.
8161
+ interactive_tx_constructor: Option<InteractiveTxConstructor>,
8152
8162
}
8153
8163
8154
8164
impl<SP: Deref> InboundV2Channel<SP> where SP::Target: SignerProvider {
@@ -8220,7 +8230,8 @@ impl<SP: Deref> InboundV2Channel<SP> where SP::Target: SignerProvider {
8220
8230
their_funding_satoshis: msg.common_fields.funding_satoshis,
8221
8231
funding_tx_locktime: msg.locktime,
8222
8232
funding_feerate_sat_per_1000_weight: msg.funding_feerate_sat_per_1000_weight,
8223
- }
8233
+ },
8234
+ interactive_tx_constructor: None,
8224
8235
};
8225
8236
8226
8237
Ok(chan)
@@ -9345,6 +9356,7 @@ impl<'a, 'b, 'c, ES: Deref, SP: Deref> ReadableArgs<(&'a ES, &'b SP, u32, &'c Ch
9345
9356
blocked_monitor_updates: blocked_monitor_updates.unwrap(),
9346
9357
},
9347
9358
dual_funding_channel_context: None,
9359
+ interactive_tx_constructor: None,
9348
9360
})
9349
9361
}
9350
9362
}
0 commit comments