@@ -1515,6 +1515,8 @@ impl<SP: Deref> Channel<SP> where
1515
1515
interactive_tx_signing_session: chan.interactive_tx_signing_session,
1516
1516
holder_commitment_point,
1517
1517
is_v2_established: true,
1518
+ #[cfg(splicing)]
1519
+ pending_splice_pre: None,
1518
1520
};
1519
1521
let res = funded_channel.commitment_signed_initial_v2(msg, best_block, signer_provider, logger)
1520
1522
.map(|monitor| (Some(monitor), None))
@@ -1775,10 +1777,6 @@ pub(super) struct ChannelContext<SP: Deref> where SP::Target: SignerProvider {
1775
1777
1776
1778
secp_ctx: Secp256k1<secp256k1::All>,
1777
1779
1778
- /// Info about an in-progress, pending splice (if any), on the pre-splice channel
1779
- #[cfg(splicing)]
1780
- pending_splice_pre: Option<PendingSpliceInfoPre>,
1781
-
1782
1780
latest_monitor_update_id: u64,
1783
1781
1784
1782
holder_signer: ChannelSignerType<SP>,
@@ -2843,9 +2841,6 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
2843
2841
next_funding_txid: None,
2844
2842
2845
2843
is_holder_quiescence_initiator: None,
2846
-
2847
- #[cfg(splicing)]
2848
- pending_splice_pre: None,
2849
2844
};
2850
2845
2851
2846
Ok((funding, channel_context))
@@ -3078,9 +3073,6 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
3078
3073
next_funding_txid: None,
3079
3074
3080
3075
is_holder_quiescence_initiator: None,
3081
-
3082
- #[cfg(splicing)]
3083
- pending_splice_pre: None,
3084
3076
};
3085
3077
3086
3078
Ok((funding, channel_context))
@@ -4892,6 +4884,9 @@ pub(super) struct FundedChannel<SP: Deref> where SP::Target: SignerProvider {
4892
4884
/// Indicates whether this funded channel had been established with V2 channel
4893
4885
/// establishment.
4894
4886
is_v2_established: bool,
4887
+ /// Info about an in-progress, pending splice (if any), on the pre-splice channel
4888
+ #[cfg(splicing)]
4889
+ pending_splice_pre: Option<PendingSpliceInfoPre>,
4895
4890
}
4896
4891
4897
4892
#[cfg(any(test, fuzzing))]
@@ -8526,7 +8521,7 @@ impl<SP: Deref> FundedChannel<SP> where
8526
8521
) -> Result<msgs::SpliceInit, ChannelError> {
8527
8522
// Check if a splice has been initiated already.
8528
8523
// Note: this could be handled more nicely, and support multiple outstanding splice's, the incoming splice_ack matters anyways.
8529
- if let Some(splice_info) = &self.context. pending_splice_pre {
8524
+ if let Some(splice_info) = &self.pending_splice_pre {
8530
8525
return Err(ChannelError::Warn(format!(
8531
8526
"Channel has already a splice pending, contribution {}", splice_info.our_funding_contribution
8532
8527
)));
@@ -8555,7 +8550,7 @@ impl<SP: Deref> FundedChannel<SP> where
8555
8550
// Note: post-splice channel value is not yet known at this point, counterpary contribution is not known
8556
8551
// (Cannot test for miminum required post-splice channel value)
8557
8552
8558
- self.context. pending_splice_pre = Some(PendingSpliceInfoPre {
8553
+ self.pending_splice_pre = Some(PendingSpliceInfoPre {
8559
8554
our_funding_contribution: our_funding_contribution_satoshis,
8560
8555
});
8561
8556
@@ -8572,7 +8567,7 @@ impl<SP: Deref> FundedChannel<SP> where
8572
8567
8573
8568
// Check if a splice has been initiated already.
8574
8569
// Note: this could be handled more nicely, and support multiple outstanding splice's, the incoming splice_ack matters anyways.
8575
- if let Some(splice_info) = &self.context. pending_splice_pre {
8570
+ if let Some(splice_info) = &self.pending_splice_pre {
8576
8571
return Err(ChannelError::Warn(format!(
8577
8572
"Channel has already a splice pending, contribution {}", splice_info.our_funding_contribution,
8578
8573
)));
@@ -8621,7 +8616,7 @@ impl<SP: Deref> FundedChannel<SP> where
8621
8616
let their_funding_contribution_satoshis = msg.funding_contribution_satoshis;
8622
8617
8623
8618
// check if splice is pending
8624
- let pending_splice = if let Some(pending_splice) = &self.context. pending_splice_pre {
8619
+ let pending_splice = if let Some(pending_splice) = &self.pending_splice_pre {
8625
8620
pending_splice
8626
8621
} else {
8627
8622
return Err(ChannelError::Warn(format!("Channel is not in pending splice")));
@@ -9557,6 +9552,8 @@ impl<SP: Deref> OutboundV1Channel<SP> where SP::Target: SignerProvider {
9557
9552
interactive_tx_signing_session: None,
9558
9553
is_v2_established: false,
9559
9554
holder_commitment_point,
9555
+ #[cfg(splicing)]
9556
+ pending_splice_pre: None,
9560
9557
};
9561
9558
9562
9559
let need_channel_ready = channel.check_get_channel_ready(0, logger).is_some()
@@ -9824,6 +9821,8 @@ impl<SP: Deref> InboundV1Channel<SP> where SP::Target: SignerProvider {
9824
9821
interactive_tx_signing_session: None,
9825
9822
is_v2_established: false,
9826
9823
holder_commitment_point,
9824
+ #[cfg(splicing)]
9825
+ pending_splice_pre: None,
9827
9826
};
9828
9827
let need_channel_ready = channel.check_get_channel_ready(0, logger).is_some()
9829
9828
|| channel.context.signer_pending_channel_ready;
@@ -11182,13 +11181,12 @@ impl<'a, 'b, 'c, ES: Deref, SP: Deref> ReadableArgs<(&'a ES, &'b SP, &'c Channel
11182
11181
next_funding_txid: None,
11183
11182
11184
11183
is_holder_quiescence_initiator: None,
11185
-
11186
- #[cfg(splicing)]
11187
- pending_splice_pre: None,
11188
11184
},
11189
11185
interactive_tx_signing_session: None,
11190
11186
is_v2_established,
11191
11187
holder_commitment_point,
11188
+ #[cfg(splicing)]
11189
+ pending_splice_pre: None,
11192
11190
})
11193
11191
}
11194
11192
}
0 commit comments