@@ -1599,10 +1599,6 @@ pub(super) struct ChannelContext<SP: Deref> where SP::Target: SignerProvider {
1599
1599
secp_ctx: Secp256k1<secp256k1::All>,
1600
1600
channel_value_satoshis: u64,
1601
1601
1602
- /// Info about an in-progress, pending splice (if any), on the pre-splice channel
1603
- #[cfg(splicing)]
1604
- pending_splice_pre: Option<PendingSpliceInfoPre>,
1605
-
1606
1602
latest_monitor_update_id: u64,
1607
1603
1608
1604
holder_signer: ChannelSignerType<SP>,
@@ -2315,6 +2311,8 @@ impl<SP: Deref> PendingV2Channel<SP> where SP::Target: SignerProvider {
2315
2311
context: self.context,
2316
2312
interactive_tx_signing_session: Some(signing_session),
2317
2313
holder_commitment_point,
2314
+ #[cfg(splicing)]
2315
+ pending_splice_pre: None,
2318
2316
};
2319
2317
Ok((funded_chan, commitment_signed, funding_ready_for_sig_event))
2320
2318
},
@@ -2665,9 +2663,6 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
2665
2663
is_manual_broadcast: false,
2666
2664
2667
2665
next_funding_txid: None,
2668
-
2669
- #[cfg(splicing)]
2670
- pending_splice_pre: None,
2671
2666
};
2672
2667
2673
2668
Ok(channel_context)
@@ -2895,9 +2890,6 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
2895
2890
local_initiated_shutdown: None,
2896
2891
is_manual_broadcast: false,
2897
2892
next_funding_txid: None,
2898
-
2899
- #[cfg(splicing)]
2900
- pending_splice_pre: None,
2901
2893
})
2902
2894
}
2903
2895
@@ -4733,6 +4725,9 @@ pub(super) struct FundedChannel<SP: Deref> where SP::Target: SignerProvider {
4733
4725
pub context: ChannelContext<SP>,
4734
4726
pub interactive_tx_signing_session: Option<InteractiveTxSigningSession>,
4735
4727
holder_commitment_point: HolderCommitmentPoint,
4728
+ /// Info about an in-progress, pending splice (if any), on the pre-splice channel
4729
+ #[cfg(splicing)]
4730
+ pending_splice_pre: Option<PendingSpliceInfoPre>,
4736
4731
}
4737
4732
4738
4733
#[cfg(any(test, fuzzing))]
@@ -8319,7 +8314,7 @@ impl<SP: Deref> FundedChannel<SP> where
8319
8314
) -> Result<msgs::SpliceInit, ChannelError> {
8320
8315
// Check if a splice has been initiated already.
8321
8316
// Note: this could be handled more nicely, and support multiple outstanding splice's, the incoming splice_ack matters anyways.
8322
- if let Some(splice_info) = &self.context. pending_splice_pre {
8317
+ if let Some(splice_info) = &self.pending_splice_pre {
8323
8318
return Err(ChannelError::Warn(format!(
8324
8319
"Channel has already a splice pending, contribution {}", splice_info.our_funding_contribution
8325
8320
)));
@@ -8348,7 +8343,7 @@ impl<SP: Deref> FundedChannel<SP> where
8348
8343
// Note: post-splice channel value is not yet known at this point, counterpary contribution is not known
8349
8344
// (Cannot test for miminum required post-splice channel value)
8350
8345
8351
- self.context. pending_splice_pre = Some(PendingSpliceInfoPre {
8346
+ self.pending_splice_pre = Some(PendingSpliceInfoPre {
8352
8347
our_funding_contribution: our_funding_contribution_satoshis,
8353
8348
});
8354
8349
@@ -8365,7 +8360,7 @@ impl<SP: Deref> FundedChannel<SP> where
8365
8360
8366
8361
// Check if a splice has been initiated already.
8367
8362
// Note: this could be handled more nicely, and support multiple outstanding splice's, the incoming splice_ack matters anyways.
8368
- if let Some(splice_info) = &self.context. pending_splice_pre {
8363
+ if let Some(splice_info) = &self.pending_splice_pre {
8369
8364
return Err(ChannelError::Warn(format!(
8370
8365
"Channel has already a splice pending, contribution {}", splice_info.our_funding_contribution,
8371
8366
)));
@@ -8414,7 +8409,7 @@ impl<SP: Deref> FundedChannel<SP> where
8414
8409
let their_funding_contribution_satoshis = msg.funding_contribution_satoshis;
8415
8410
8416
8411
// check if splice is pending
8417
- let pending_splice = if let Some(pending_splice) = &self.context. pending_splice_pre {
8412
+ let pending_splice = if let Some(pending_splice) = &self.pending_splice_pre {
8418
8413
pending_splice
8419
8414
} else {
8420
8415
return Err(ChannelError::Warn(format!("Channel is not in pending splice")));
@@ -9124,6 +9119,8 @@ impl<SP: Deref> OutboundV1Channel<SP> where SP::Target: SignerProvider {
9124
9119
context: self.context,
9125
9120
interactive_tx_signing_session: None,
9126
9121
holder_commitment_point,
9122
+ #[cfg(splicing)]
9123
+ pending_splice_pre: None,
9127
9124
};
9128
9125
9129
9126
let need_channel_ready = channel.check_get_channel_ready(0, logger).is_some()
@@ -9389,6 +9386,8 @@ impl<SP: Deref> InboundV1Channel<SP> where SP::Target: SignerProvider {
9389
9386
context: self.context,
9390
9387
interactive_tx_signing_session: None,
9391
9388
holder_commitment_point,
9389
+ #[cfg(splicing)]
9390
+ pending_splice_pre: None,
9392
9391
};
9393
9392
let need_channel_ready = channel.check_get_channel_ready(0, logger).is_some()
9394
9393
|| channel.context.signer_pending_channel_ready;
@@ -10769,12 +10768,11 @@ impl<'a, 'b, 'c, ES: Deref, SP: Deref> ReadableArgs<(&'a ES, &'b SP, u32, &'c Ch
10769
10768
// during a signing session, but have not received `tx_signatures` we MUST set `next_funding_txid`
10770
10769
// to the txid of that interactive transaction, else we MUST NOT set it.
10771
10770
next_funding_txid: None,
10772
-
10773
- #[cfg(splicing)]
10774
- pending_splice_pre: None,
10775
10771
},
10776
10772
interactive_tx_signing_session: None,
10777
10773
holder_commitment_point,
10774
+ #[cfg(splicing)]
10775
+ pending_splice_pre: None,
10778
10776
})
10779
10777
}
10780
10778
}
0 commit comments