@@ -1485,10 +1485,6 @@ pub(super) struct ChannelContext<SP: Deref> where SP::Target: SignerProvider {
1485
1485
secp_ctx: Secp256k1<secp256k1::All>,
1486
1486
channel_value_satoshis: u64,
1487
1487
1488
- /// Info about an in-progress, pending splice (if any), on the pre-splice channel
1489
- #[cfg(splicing)]
1490
- pending_splice_pre: Option<PendingSpliceInfoPre>,
1491
-
1492
1488
latest_monitor_update_id: u64,
1493
1489
1494
1490
holder_signer: ChannelSignerType<SP>,
@@ -2543,9 +2539,6 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
2543
2539
is_manual_broadcast: false,
2544
2540
2545
2541
next_funding_txid: None,
2546
-
2547
- #[cfg(splicing)]
2548
- pending_splice_pre: None,
2549
2542
};
2550
2543
2551
2544
Ok(channel_context)
@@ -2776,9 +2769,6 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
2776
2769
local_initiated_shutdown: None,
2777
2770
is_manual_broadcast: false,
2778
2771
next_funding_txid: None,
2779
-
2780
- #[cfg(splicing)]
2781
- pending_splice_pre: None,
2782
2772
})
2783
2773
}
2784
2774
@@ -4610,6 +4600,9 @@ pub(super) struct FundedChannel<SP: Deref> where SP::Target: SignerProvider {
4610
4600
pub context: ChannelContext<SP>,
4611
4601
pub interactive_tx_signing_session: Option<InteractiveTxSigningSession>,
4612
4602
holder_commitment_point: HolderCommitmentPoint,
4603
+ /// Info about an in-progress, pending splice (if any), on the pre-splice channel
4604
+ #[cfg(splicing)]
4605
+ pending_splice_pre: Option<PendingSpliceInfoPre>,
4613
4606
}
4614
4607
4615
4608
#[cfg(any(test, fuzzing))]
@@ -8231,7 +8224,7 @@ impl<SP: Deref> FundedChannel<SP> where
8231
8224
) -> Result<msgs::SpliceInit, ChannelError> {
8232
8225
// Check if a splice has been initiated already.
8233
8226
// Note: this could be handled more nicely, and support multiple outstanding splice's, the incoming splice_ack matters anyways.
8234
- if let Some(splice_info) = &self.context. pending_splice_pre {
8227
+ if let Some(splice_info) = &self.pending_splice_pre {
8235
8228
return Err(ChannelError::Warn(format!(
8236
8229
"Channel has already a splice pending, contribution {}", splice_info.our_funding_contribution
8237
8230
)));
@@ -8260,7 +8253,7 @@ impl<SP: Deref> FundedChannel<SP> where
8260
8253
// Note: post-splice channel value is not yet known at this point, counterpary contribution is not known
8261
8254
// (Cannot test for miminum required post-splice channel value)
8262
8255
8263
- self.context. pending_splice_pre = Some(PendingSpliceInfoPre {
8256
+ self.pending_splice_pre = Some(PendingSpliceInfoPre {
8264
8257
our_funding_contribution: our_funding_contribution_satoshis,
8265
8258
});
8266
8259
@@ -8277,7 +8270,7 @@ impl<SP: Deref> FundedChannel<SP> where
8277
8270
8278
8271
// Check if a splice has been initiated already.
8279
8272
// Note: this could be handled more nicely, and support multiple outstanding splice's, the incoming splice_ack matters anyways.
8280
- if let Some(splice_info) = &self.context. pending_splice_pre {
8273
+ if let Some(splice_info) = &self.pending_splice_pre {
8281
8274
return Err(ChannelError::Warn(format!(
8282
8275
"Channel has already a splice pending, contribution {}", splice_info.our_funding_contribution,
8283
8276
)));
@@ -8326,7 +8319,7 @@ impl<SP: Deref> FundedChannel<SP> where
8326
8319
let their_funding_contribution_satoshis = msg.funding_contribution_satoshis;
8327
8320
8328
8321
// check if splice is pending
8329
- let pending_splice = if let Some(pending_splice) = &self.context. pending_splice_pre {
8322
+ let pending_splice = if let Some(pending_splice) = &self.pending_splice_pre {
8330
8323
pending_splice
8331
8324
} else {
8332
8325
return Err(ChannelError::Warn(format!("Channel is not in pending splice")));
@@ -9036,6 +9029,8 @@ impl<SP: Deref> OutboundV1Channel<SP> where SP::Target: SignerProvider {
9036
9029
context: self.context,
9037
9030
interactive_tx_signing_session: None,
9038
9031
holder_commitment_point,
9032
+ #[cfg(splicing)]
9033
+ pending_splice_pre: None,
9039
9034
};
9040
9035
9041
9036
let need_channel_ready = channel.check_get_channel_ready(0, logger).is_some()
@@ -9301,6 +9296,8 @@ impl<SP: Deref> InboundV1Channel<SP> where SP::Target: SignerProvider {
9301
9296
context: self.context,
9302
9297
interactive_tx_signing_session: None,
9303
9298
holder_commitment_point,
9299
+ #[cfg(splicing)]
9300
+ pending_splice_pre: None,
9304
9301
};
9305
9302
let need_channel_ready = channel.check_get_channel_ready(0, logger).is_some()
9306
9303
|| channel.context.signer_pending_channel_ready;
@@ -9664,6 +9661,8 @@ impl<SP: Deref> PendingV2Channel<SP> where SP::Target: SignerProvider {
9664
9661
context: self.context,
9665
9662
interactive_tx_signing_session: Some(signing_session),
9666
9663
holder_commitment_point,
9664
+ #[cfg(splicing)]
9665
+ pending_splice_pre: None,
9667
9666
};
9668
9667
9669
9668
Ok(channel)
@@ -10741,12 +10740,11 @@ impl<'a, 'b, 'c, ES: Deref, SP: Deref> ReadableArgs<(&'a ES, &'b SP, u32, &'c Ch
10741
10740
// during a signing session, but have not received `tx_signatures` we MUST set `next_funding_txid`
10742
10741
// to the txid of that interactive transaction, else we MUST NOT set it.
10743
10742
next_funding_txid: None,
10744
-
10745
- #[cfg(splicing)]
10746
- pending_splice_pre: None,
10747
10743
},
10748
10744
interactive_tx_signing_session: None,
10749
10745
holder_commitment_point,
10746
+ #[cfg(splicing)]
10747
+ pending_splice_pre: None,
10750
10748
})
10751
10749
}
10752
10750
}
0 commit comments