@@ -1240,10 +1240,6 @@ pub(super) struct ChannelContext<SP: Deref> where SP::Target: SignerProvider {
1240
1240
secp_ctx: Secp256k1<secp256k1::All>,
1241
1241
channel_value_satoshis: u64,
1242
1242
1243
- /// Info about an in-progress, pending splice (if any), on the pre-splice channel
1244
- #[cfg(splicing)]
1245
- pending_splice_pre: Option<PendingSpliceInfoPre>,
1246
-
1247
1243
latest_monitor_update_id: u64,
1248
1244
1249
1245
holder_signer: ChannelSignerType<SP>,
@@ -2234,9 +2230,6 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
2234
2230
is_manual_broadcast: false,
2235
2231
2236
2232
next_funding_txid: None,
2237
-
2238
- #[cfg(splicing)]
2239
- pending_splice_pre: None,
2240
2233
};
2241
2234
2242
2235
Ok(channel_context)
@@ -2470,9 +2463,6 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
2470
2463
local_initiated_shutdown: None,
2471
2464
is_manual_broadcast: false,
2472
2465
next_funding_txid: None,
2473
-
2474
- #[cfg(splicing)]
2475
- pending_splice_pre: None,
2476
2466
})
2477
2467
}
2478
2468
@@ -4298,6 +4288,9 @@ pub(super) struct DualFundingChannelContext {
4298
4288
pub(super) struct Channel<SP: Deref> where SP::Target: SignerProvider {
4299
4289
pub context: ChannelContext<SP>,
4300
4290
pub interactive_tx_signing_session: Option<InteractiveTxSigningSession>,
4291
+ /// Info about an in-progress, pending splice (if any), on the pre-splice channel
4292
+ #[cfg(splicing)]
4293
+ pending_splice_pre: Option<PendingSpliceInfoPre>,
4301
4294
}
4302
4295
4303
4296
#[cfg(any(test, fuzzing))]
@@ -7906,7 +7899,7 @@ impl<SP: Deref> Channel<SP> where
7906
7899
) -> Result<msgs::SpliceInit, ChannelError> {
7907
7900
// Check if a splice has been initiated already.
7908
7901
// Note: this could be handled more nicely, and support multiple outstanding splice's, the incoming splice_ack matters anyways.
7909
- if let Some(splice_info) = &self.context. pending_splice_pre {
7902
+ if let Some(splice_info) = &self.pending_splice_pre {
7910
7903
return Err(ChannelError::Warn(format!(
7911
7904
"Channel has already a splice pending, contribution {}", splice_info.our_funding_contribution
7912
7905
)));
@@ -7935,7 +7928,7 @@ impl<SP: Deref> Channel<SP> where
7935
7928
// Note: post-splice channel value is not yet known at this point, counterpary contribution is not known
7936
7929
// (Cannot test for miminum required post-splice channel value)
7937
7930
7938
- self.context. pending_splice_pre = Some(PendingSpliceInfoPre {
7931
+ self.pending_splice_pre = Some(PendingSpliceInfoPre {
7939
7932
our_funding_contribution: our_funding_contribution_satoshis,
7940
7933
});
7941
7934
@@ -7952,7 +7945,7 @@ impl<SP: Deref> Channel<SP> where
7952
7945
7953
7946
// Check if a splice has been initiated already.
7954
7947
// Note: this could be handled more nicely, and support multiple outstanding splice's, the incoming splice_ack matters anyways.
7955
- if let Some(splice_info) = &self.context. pending_splice_pre {
7948
+ if let Some(splice_info) = &self.pending_splice_pre {
7956
7949
return Err(ChannelError::Warn(format!(
7957
7950
"Channel has already a splice pending, contribution {}", splice_info.our_funding_contribution,
7958
7951
)));
@@ -8001,7 +7994,7 @@ impl<SP: Deref> Channel<SP> where
8001
7994
let their_funding_contribution_satoshis = msg.funding_contribution_satoshis;
8002
7995
8003
7996
// check if splice is pending
8004
- let pending_splice = if let Some(pending_splice) = &self.context. pending_splice_pre {
7997
+ let pending_splice = if let Some(pending_splice) = &self.pending_splice_pre {
8005
7998
pending_splice
8006
7999
} else {
8007
8000
return Err(ChannelError::Warn(format!("Channel is not in pending splice")));
@@ -8693,6 +8686,8 @@ impl<SP: Deref> OutboundV1Channel<SP> where SP::Target: SignerProvider {
8693
8686
let mut channel = Channel {
8694
8687
context: self.context,
8695
8688
interactive_tx_signing_session: None,
8689
+ #[cfg(splicing)]
8690
+ pending_splice_pre: None,
8696
8691
};
8697
8692
8698
8693
let need_channel_ready = channel.check_get_channel_ready(0, logger).is_some();
@@ -8918,6 +8913,8 @@ impl<SP: Deref> InboundV1Channel<SP> where SP::Target: SignerProvider {
8918
8913
let mut channel = Channel {
8919
8914
context: self.context,
8920
8915
interactive_tx_signing_session: None,
8916
+ #[cfg(splicing)]
8917
+ pending_splice_pre: None,
8921
8918
};
8922
8919
let need_channel_ready = channel.check_get_channel_ready(0, logger).is_some();
8923
8920
channel.monitor_updating_paused(false, false, need_channel_ready, Vec::new(), Vec::new(), Vec::new());
@@ -9063,6 +9060,8 @@ impl<SP: Deref> OutboundV2Channel<SP> where SP::Target: SignerProvider {
9063
9060
let channel = Channel {
9064
9061
context: self.context,
9065
9062
interactive_tx_signing_session: Some(signing_session),
9063
+ #[cfg(splicing)]
9064
+ pending_splice_pre: None,
9066
9065
};
9067
9066
9068
9067
Ok(channel)
@@ -9257,6 +9256,8 @@ impl<SP: Deref> InboundV2Channel<SP> where SP::Target: SignerProvider {
9257
9256
let channel = Channel {
9258
9257
context: self.context,
9259
9258
interactive_tx_signing_session: Some(signing_session),
9259
+ #[cfg(splicing)]
9260
+ pending_splice_pre: None,
9260
9261
};
9261
9262
9262
9263
Ok(channel)
@@ -10333,11 +10334,10 @@ impl<'a, 'b, 'c, ES: Deref, SP: Deref> ReadableArgs<(&'a ES, &'b SP, u32, &'c Ch
10333
10334
// during a signing session, but have not received `tx_signatures` we MUST set `next_funding_txid`
10334
10335
// to the txid of that interactive transaction, else we MUST NOT set it.
10335
10336
next_funding_txid,
10336
-
10337
- #[cfg(splicing)]
10338
- pending_splice_pre: None,
10339
10337
},
10340
10338
interactive_tx_signing_session: None,
10339
+ #[cfg(splicing)]
10340
+ pending_splice_pre: None,
10341
10341
})
10342
10342
}
10343
10343
}
0 commit comments