@@ -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};
@@ -3636,6 +3637,8 @@ pub(super) struct DualFundingChannelContext {
3636
3637
pub(super) struct Channel<SP: Deref> where SP::Target: SignerProvider {
3637
3638
pub context: ChannelContext<SP>,
3638
3639
pub dual_funding_channel_context: Option<DualFundingChannelContext>,
3640
+ /// The current interactive transaction construction session under negotiation.
3641
+ interactive_tx_constructor: Option<InteractiveTxConstructor>,
3639
3642
}
3640
3643
3641
3644
#[cfg(any(test, fuzzing))]
@@ -7775,6 +7778,7 @@ impl<SP: Deref> OutboundV1Channel<SP> where SP::Target: SignerProvider {
7775
7778
let mut channel = Channel {
7776
7779
context: self.context,
7777
7780
dual_funding_channel_context: None,
7781
+ interactive_tx_constructor: None,
7778
7782
};
7779
7783
7780
7784
let need_channel_ready = channel.check_get_channel_ready(0, logger).is_some();
@@ -7883,7 +7887,7 @@ impl<SP: Deref> InboundV1Channel<SP> where SP::Target: SignerProvider {
7883
7887
msg.push_msat,
7884
7888
msg.common_fields.clone(),
7885
7889
)?,
7886
- unfunded_context: UnfundedChannelContext { unfunded_channel_age_ticks: 0 }
7890
+ unfunded_context: UnfundedChannelContext { unfunded_channel_age_ticks: 0 },
7887
7891
};
7888
7892
Ok(chan)
7889
7893
}
@@ -8065,6 +8069,7 @@ impl<SP: Deref> InboundV1Channel<SP> where SP::Target: SignerProvider {
8065
8069
let mut channel = Channel {
8066
8070
context: self.context,
8067
8071
dual_funding_channel_context: None,
8072
+ interactive_tx_constructor: None,
8068
8073
};
8069
8074
let need_channel_ready = channel.check_get_channel_ready(0, logger).is_some();
8070
8075
channel.monitor_updating_paused(false, false, need_channel_ready, Vec::new(), Vec::new(), Vec::new());
@@ -8078,6 +8083,8 @@ pub(super) struct OutboundV2Channel<SP: Deref> where SP::Target: SignerProvider
8078
8083
pub context: ChannelContext<SP>,
8079
8084
pub unfunded_context: UnfundedChannelContext,
8080
8085
pub dual_funding_context: DualFundingChannelContext,
8086
+ /// The current interactive transaction construction session under negotiation.
8087
+ interactive_tx_constructor: Option<InteractiveTxConstructor>,
8081
8088
}
8082
8089
8083
8090
impl<SP: Deref> OutboundV2Channel<SP> where SP::Target: SignerProvider {
@@ -8127,7 +8134,8 @@ impl<SP: Deref> OutboundV2Channel<SP> where SP::Target: SignerProvider {
8127
8134
their_funding_satoshis: 0,
8128
8135
funding_tx_locktime,
8129
8136
funding_feerate_sat_per_1000_weight,
8130
- }
8137
+ },
8138
+ interactive_tx_constructor: None,
8131
8139
};
8132
8140
Ok(chan)
8133
8141
}
@@ -8199,6 +8207,8 @@ pub(super) struct InboundV2Channel<SP: Deref> where SP::Target: SignerProvider {
8199
8207
pub context: ChannelContext<SP>,
8200
8208
pub unfunded_context: UnfundedChannelContext,
8201
8209
pub dual_funding_context: DualFundingChannelContext,
8210
+ /// The current interactive transaction construction session under negotiation.
8211
+ interactive_tx_constructor: Option<InteractiveTxConstructor>,
8202
8212
}
8203
8213
8204
8214
impl<SP: Deref> InboundV2Channel<SP> where SP::Target: SignerProvider {
@@ -8270,7 +8280,8 @@ impl<SP: Deref> InboundV2Channel<SP> where SP::Target: SignerProvider {
8270
8280
their_funding_satoshis: msg.common_fields.funding_satoshis,
8271
8281
funding_tx_locktime: msg.locktime,
8272
8282
funding_feerate_sat_per_1000_weight: msg.funding_feerate_sat_per_1000_weight,
8273
- }
8283
+ },
8284
+ interactive_tx_constructor: None,
8274
8285
};
8275
8286
8276
8287
Ok(chan)
@@ -9396,6 +9407,7 @@ impl<'a, 'b, 'c, ES: Deref, SP: Deref> ReadableArgs<(&'a ES, &'b SP, u32, &'c Ch
9396
9407
blocked_monitor_updates: blocked_monitor_updates.unwrap(),
9397
9408
},
9398
9409
dual_funding_channel_context: None,
9410
+ interactive_tx_constructor: None,
9399
9411
})
9400
9412
}
9401
9413
}
0 commit comments