@@ -1245,10 +1245,6 @@ pub(super) struct ChannelContext<SP: Deref> where SP::Target: SignerProvider {
1245
1245
secp_ctx: Secp256k1<secp256k1::All>,
1246
1246
channel_value_satoshis: u64,
1247
1247
1248
- /// Info about an in-progress, pending splice (if any), on the pre-splice channel
1249
- #[cfg(splicing)]
1250
- pending_splice_pre: Option<PendingSpliceInfoPre>,
1251
-
1252
1248
latest_monitor_update_id: u64,
1253
1249
1254
1250
holder_signer: ChannelSignerType<SP>,
@@ -2370,9 +2366,6 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
2370
2366
is_manual_broadcast: false,
2371
2367
2372
2368
next_funding_txid: None,
2373
-
2374
- #[cfg(splicing)]
2375
- pending_splice_pre: None,
2376
2369
};
2377
2370
2378
2371
Ok(channel_context)
@@ -2603,9 +2596,6 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
2603
2596
local_initiated_shutdown: None,
2604
2597
is_manual_broadcast: false,
2605
2598
next_funding_txid: None,
2606
-
2607
- #[cfg(splicing)]
2608
- pending_splice_pre: None,
2609
2599
})
2610
2600
}
2611
2601
@@ -4437,6 +4427,9 @@ pub(super) struct Channel<SP: Deref> where SP::Target: SignerProvider {
4437
4427
pub context: ChannelContext<SP>,
4438
4428
pub interactive_tx_signing_session: Option<InteractiveTxSigningSession>,
4439
4429
holder_commitment_point: HolderCommitmentPoint,
4430
+ /// Info about an in-progress, pending splice (if any), on the pre-splice channel
4431
+ #[cfg(splicing)]
4432
+ pending_splice_pre: Option<PendingSpliceInfoPre>,
4440
4433
}
4441
4434
4442
4435
#[cfg(any(test, fuzzing))]
@@ -8055,7 +8048,7 @@ impl<SP: Deref> Channel<SP> where
8055
8048
) -> Result<msgs::SpliceInit, ChannelError> {
8056
8049
// Check if a splice has been initiated already.
8057
8050
// Note: this could be handled more nicely, and support multiple outstanding splice's, the incoming splice_ack matters anyways.
8058
- if let Some(splice_info) = &self.context. pending_splice_pre {
8051
+ if let Some(splice_info) = &self.pending_splice_pre {
8059
8052
return Err(ChannelError::Warn(format!(
8060
8053
"Channel has already a splice pending, contribution {}", splice_info.our_funding_contribution
8061
8054
)));
@@ -8084,7 +8077,7 @@ impl<SP: Deref> Channel<SP> where
8084
8077
// Note: post-splice channel value is not yet known at this point, counterpary contribution is not known
8085
8078
// (Cannot test for miminum required post-splice channel value)
8086
8079
8087
- self.context. pending_splice_pre = Some(PendingSpliceInfoPre {
8080
+ self.pending_splice_pre = Some(PendingSpliceInfoPre {
8088
8081
our_funding_contribution: our_funding_contribution_satoshis,
8089
8082
});
8090
8083
@@ -8101,7 +8094,7 @@ impl<SP: Deref> Channel<SP> where
8101
8094
8102
8095
// Check if a splice has been initiated already.
8103
8096
// Note: this could be handled more nicely, and support multiple outstanding splice's, the incoming splice_ack matters anyways.
8104
- if let Some(splice_info) = &self.context. pending_splice_pre {
8097
+ if let Some(splice_info) = &self.pending_splice_pre {
8105
8098
return Err(ChannelError::Warn(format!(
8106
8099
"Channel has already a splice pending, contribution {}", splice_info.our_funding_contribution,
8107
8100
)));
@@ -8150,7 +8143,7 @@ impl<SP: Deref> Channel<SP> where
8150
8143
let their_funding_contribution_satoshis = msg.funding_contribution_satoshis;
8151
8144
8152
8145
// check if splice is pending
8153
- let pending_splice = if let Some(pending_splice) = &self.context. pending_splice_pre {
8146
+ let pending_splice = if let Some(pending_splice) = &self.pending_splice_pre {
8154
8147
pending_splice
8155
8148
} else {
8156
8149
return Err(ChannelError::Warn(format!("Channel is not in pending splice")));
@@ -8860,6 +8853,8 @@ impl<SP: Deref> OutboundV1Channel<SP> where SP::Target: SignerProvider {
8860
8853
context: self.context,
8861
8854
interactive_tx_signing_session: None,
8862
8855
holder_commitment_point,
8856
+ #[cfg(splicing)]
8857
+ pending_splice_pre: None,
8863
8858
};
8864
8859
8865
8860
let need_channel_ready = channel.check_get_channel_ready(0, logger).is_some()
@@ -9125,6 +9120,8 @@ impl<SP: Deref> InboundV1Channel<SP> where SP::Target: SignerProvider {
9125
9120
context: self.context,
9126
9121
interactive_tx_signing_session: None,
9127
9122
holder_commitment_point,
9123
+ #[cfg(splicing)]
9124
+ pending_splice_pre: None,
9128
9125
};
9129
9126
let need_channel_ready = channel.check_get_channel_ready(0, logger).is_some()
9130
9127
|| channel.context.signer_pending_channel_ready;
@@ -9300,6 +9297,8 @@ impl<SP: Deref> OutboundV2Channel<SP> where SP::Target: SignerProvider {
9300
9297
context: self.context,
9301
9298
interactive_tx_signing_session: Some(signing_session),
9302
9299
holder_commitment_point,
9300
+ #[cfg(splicing)]
9301
+ pending_splice_pre: None,
9303
9302
};
9304
9303
9305
9304
Ok(channel)
@@ -9506,6 +9505,8 @@ impl<SP: Deref> InboundV2Channel<SP> where SP::Target: SignerProvider {
9506
9505
context: self.context,
9507
9506
interactive_tx_signing_session: Some(signing_session),
9508
9507
holder_commitment_point,
9508
+ #[cfg(splicing)]
9509
+ pending_splice_pre: None,
9509
9510
};
9510
9511
9511
9512
Ok(channel)
@@ -10583,12 +10584,11 @@ impl<'a, 'b, 'c, ES: Deref, SP: Deref> ReadableArgs<(&'a ES, &'b SP, u32, &'c Ch
10583
10584
// during a signing session, but have not received `tx_signatures` we MUST set `next_funding_txid`
10584
10585
// to the txid of that interactive transaction, else we MUST NOT set it.
10585
10586
next_funding_txid: None,
10586
-
10587
- #[cfg(splicing)]
10588
- pending_splice_pre: None,
10589
10587
},
10590
10588
interactive_tx_signing_session: None,
10591
10589
holder_commitment_point,
10590
+ #[cfg(splicing)]
10591
+ pending_splice_pre: None,
10592
10592
})
10593
10593
}
10594
10594
}
0 commit comments