@@ -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
@@ -4306,6 +4296,9 @@ pub(super) struct DualFundingChannelContext {
4306
4296
pub(super) struct Channel<SP: Deref> where SP::Target: SignerProvider {
4307
4297
pub context: ChannelContext<SP>,
4308
4298
pub interactive_tx_signing_session: Option<InteractiveTxSigningSession>,
4299
+ /// Info about an in-progress, pending splice (if any), on the pre-splice channel
4300
+ #[cfg(splicing)]
4301
+ pending_splice_pre: Option<PendingSpliceInfoPre>,
4309
4302
}
4310
4303
4311
4304
#[cfg(any(test, fuzzing))]
@@ -7914,7 +7907,7 @@ impl<SP: Deref> Channel<SP> where
7914
7907
) -> Result<msgs::SpliceInit, ChannelError> {
7915
7908
// Check if a splice has been initiated already.
7916
7909
// Note: this could be handled more nicely, and support multiple outstanding splice's, the incoming splice_ack matters anyways.
7917
- if let Some(splice_info) = &self.context. pending_splice_pre {
7910
+ if let Some(splice_info) = &self.pending_splice_pre {
7918
7911
return Err(ChannelError::Warn(format!(
7919
7912
"Channel has already a splice pending, contribution {}", splice_info.our_funding_contribution
7920
7913
)));
@@ -7943,7 +7936,7 @@ impl<SP: Deref> Channel<SP> where
7943
7936
// Note: post-splice channel value is not yet known at this point, counterpary contribution is not known
7944
7937
// (Cannot test for miminum required post-splice channel value)
7945
7938
7946
- self.context. pending_splice_pre = Some(PendingSpliceInfoPre {
7939
+ self.pending_splice_pre = Some(PendingSpliceInfoPre {
7947
7940
our_funding_contribution: our_funding_contribution_satoshis,
7948
7941
});
7949
7942
@@ -7960,7 +7953,7 @@ impl<SP: Deref> Channel<SP> where
7960
7953
7961
7954
// Check if a splice has been initiated already.
7962
7955
// Note: this could be handled more nicely, and support multiple outstanding splice's, the incoming splice_ack matters anyways.
7963
- if let Some(splice_info) = &self.context. pending_splice_pre {
7956
+ if let Some(splice_info) = &self.pending_splice_pre {
7964
7957
return Err(ChannelError::Warn(format!(
7965
7958
"Channel has already a splice pending, contribution {}", splice_info.our_funding_contribution,
7966
7959
)));
@@ -8009,7 +8002,7 @@ impl<SP: Deref> Channel<SP> where
8009
8002
let their_funding_contribution_satoshis = msg.funding_contribution_satoshis;
8010
8003
8011
8004
// check if splice is pending
8012
- let pending_splice = if let Some(pending_splice) = &self.context. pending_splice_pre {
8005
+ let pending_splice = if let Some(pending_splice) = &self.pending_splice_pre {
8013
8006
pending_splice
8014
8007
} else {
8015
8008
return Err(ChannelError::Warn(format!("Channel is not in pending splice")));
@@ -8701,6 +8694,8 @@ impl<SP: Deref> OutboundV1Channel<SP> where SP::Target: SignerProvider {
8701
8694
let mut channel = Channel {
8702
8695
context: self.context,
8703
8696
interactive_tx_signing_session: None,
8697
+ #[cfg(splicing)]
8698
+ pending_splice_pre: None,
8704
8699
};
8705
8700
8706
8701
let need_channel_ready = channel.check_get_channel_ready(0, logger).is_some();
@@ -8926,6 +8921,8 @@ impl<SP: Deref> InboundV1Channel<SP> where SP::Target: SignerProvider {
8926
8921
let mut channel = Channel {
8927
8922
context: self.context,
8928
8923
interactive_tx_signing_session: None,
8924
+ #[cfg(splicing)]
8925
+ pending_splice_pre: None,
8929
8926
};
8930
8927
let need_channel_ready = channel.check_get_channel_ready(0, logger).is_some();
8931
8928
channel.monitor_updating_paused(false, false, need_channel_ready, Vec::new(), Vec::new(), Vec::new());
@@ -9071,6 +9068,8 @@ impl<SP: Deref> OutboundV2Channel<SP> where SP::Target: SignerProvider {
9071
9068
let channel = Channel {
9072
9069
context: self.context,
9073
9070
interactive_tx_signing_session: Some(signing_session),
9071
+ #[cfg(splicing)]
9072
+ pending_splice_pre: None,
9074
9073
};
9075
9074
9076
9075
Ok(channel)
@@ -9265,6 +9264,8 @@ impl<SP: Deref> InboundV2Channel<SP> where SP::Target: SignerProvider {
9265
9264
let channel = Channel {
9266
9265
context: self.context,
9267
9266
interactive_tx_signing_session: Some(signing_session),
9267
+ #[cfg(splicing)]
9268
+ pending_splice_pre: None,
9268
9269
};
9269
9270
9270
9271
Ok(channel)
@@ -10341,11 +10342,10 @@ impl<'a, 'b, 'c, ES: Deref, SP: Deref> ReadableArgs<(&'a ES, &'b SP, u32, &'c Ch
10341
10342
// during a signing session, but have not received `tx_signatures` we MUST set `next_funding_txid`
10342
10343
// to the txid of that interactive transaction, else we MUST NOT set it.
10343
10344
next_funding_txid: None,
10344
-
10345
- #[cfg(splicing)]
10346
- pending_splice_pre: None,
10347
10345
},
10348
10346
interactive_tx_signing_session: None,
10347
+ #[cfg(splicing)]
10348
+ pending_splice_pre: None,
10349
10349
})
10350
10350
}
10351
10351
}
0 commit comments