@@ -1241,10 +1241,6 @@ pub(super) struct ChannelContext<SP: Deref> where SP::Target: SignerProvider {
1241
1241
secp_ctx: Secp256k1<secp256k1::All>,
1242
1242
channel_value_satoshis: u64,
1243
1243
1244
- /// Info about an in-progress, pending splice (if any), on the pre-splice channel
1245
- #[cfg(splicing)]
1246
- pending_splice_pre: Option<PendingSpliceInfoPre>,
1247
-
1248
1244
latest_monitor_update_id: u64,
1249
1245
1250
1246
holder_signer: ChannelSignerType<SP>,
@@ -2355,9 +2351,6 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
2355
2351
is_manual_broadcast: false,
2356
2352
2357
2353
next_funding_txid: None,
2358
-
2359
- #[cfg(splicing)]
2360
- pending_splice_pre: None,
2361
2354
};
2362
2355
2363
2356
Ok(channel_context)
@@ -2591,9 +2584,6 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
2591
2584
local_initiated_shutdown: None,
2592
2585
is_manual_broadcast: false,
2593
2586
next_funding_txid: None,
2594
-
2595
- #[cfg(splicing)]
2596
- pending_splice_pre: None,
2597
2587
})
2598
2588
}
2599
2589
@@ -4432,6 +4422,9 @@ pub(super) struct DualFundingChannelContext {
4432
4422
pub(super) struct Channel<SP: Deref> where SP::Target: SignerProvider {
4433
4423
pub context: ChannelContext<SP>,
4434
4424
pub interactive_tx_signing_session: Option<InteractiveTxSigningSession>,
4425
+ /// Info about an in-progress, pending splice (if any), on the pre-splice channel
4426
+ #[cfg(splicing)]
4427
+ pending_splice_pre: Option<PendingSpliceInfoPre>,
4435
4428
}
4436
4429
4437
4430
#[cfg(any(test, fuzzing))]
@@ -8040,7 +8033,7 @@ impl<SP: Deref> Channel<SP> where
8040
8033
) -> Result<msgs::SpliceInit, ChannelError> {
8041
8034
// Check if a splice has been initiated already.
8042
8035
// Note: this could be handled more nicely, and support multiple outstanding splice's, the incoming splice_ack matters anyways.
8043
- if let Some(splice_info) = &self.context. pending_splice_pre {
8036
+ if let Some(splice_info) = &self.pending_splice_pre {
8044
8037
return Err(ChannelError::Warn(format!(
8045
8038
"Channel has already a splice pending, contribution {}", splice_info.our_funding_contribution
8046
8039
)));
@@ -8069,7 +8062,7 @@ impl<SP: Deref> Channel<SP> where
8069
8062
// Note: post-splice channel value is not yet known at this point, counterpary contribution is not known
8070
8063
// (Cannot test for miminum required post-splice channel value)
8071
8064
8072
- self.context. pending_splice_pre = Some(PendingSpliceInfoPre {
8065
+ self.pending_splice_pre = Some(PendingSpliceInfoPre {
8073
8066
our_funding_contribution: our_funding_contribution_satoshis,
8074
8067
});
8075
8068
@@ -8086,7 +8079,7 @@ impl<SP: Deref> Channel<SP> where
8086
8079
8087
8080
// Check if a splice has been initiated already.
8088
8081
// Note: this could be handled more nicely, and support multiple outstanding splice's, the incoming splice_ack matters anyways.
8089
- if let Some(splice_info) = &self.context. pending_splice_pre {
8082
+ if let Some(splice_info) = &self.pending_splice_pre {
8090
8083
return Err(ChannelError::Warn(format!(
8091
8084
"Channel has already a splice pending, contribution {}", splice_info.our_funding_contribution,
8092
8085
)));
@@ -8135,7 +8128,7 @@ impl<SP: Deref> Channel<SP> where
8135
8128
let their_funding_contribution_satoshis = msg.funding_contribution_satoshis;
8136
8129
8137
8130
// check if splice is pending
8138
- let pending_splice = if let Some(pending_splice) = &self.context. pending_splice_pre {
8131
+ let pending_splice = if let Some(pending_splice) = &self.pending_splice_pre {
8139
8132
pending_splice
8140
8133
} else {
8141
8134
return Err(ChannelError::Warn(format!("Channel is not in pending splice")));
@@ -8827,6 +8820,8 @@ impl<SP: Deref> OutboundV1Channel<SP> where SP::Target: SignerProvider {
8827
8820
let mut channel = Channel {
8828
8821
context: self.context,
8829
8822
interactive_tx_signing_session: None,
8823
+ #[cfg(splicing)]
8824
+ pending_splice_pre: None,
8830
8825
};
8831
8826
8832
8827
let need_channel_ready = channel.check_get_channel_ready(0, logger).is_some();
@@ -9052,6 +9047,8 @@ impl<SP: Deref> InboundV1Channel<SP> where SP::Target: SignerProvider {
9052
9047
let mut channel = Channel {
9053
9048
context: self.context,
9054
9049
interactive_tx_signing_session: None,
9050
+ #[cfg(splicing)]
9051
+ pending_splice_pre: None,
9055
9052
};
9056
9053
let need_channel_ready = channel.check_get_channel_ready(0, logger).is_some();
9057
9054
channel.monitor_updating_paused(false, false, need_channel_ready, Vec::new(), Vec::new(), Vec::new());
@@ -9198,6 +9195,8 @@ impl<SP: Deref> OutboundV2Channel<SP> where SP::Target: SignerProvider {
9198
9195
let channel = Channel {
9199
9196
context: self.context,
9200
9197
interactive_tx_signing_session: Some(signing_session),
9198
+ #[cfg(splicing)]
9199
+ pending_splice_pre: None,
9201
9200
};
9202
9201
9203
9202
Ok(channel)
@@ -9393,6 +9392,8 @@ impl<SP: Deref> InboundV2Channel<SP> where SP::Target: SignerProvider {
9393
9392
let channel = Channel {
9394
9393
context: self.context,
9395
9394
interactive_tx_signing_session: Some(signing_session),
9395
+ #[cfg(splicing)]
9396
+ pending_splice_pre: None,
9396
9397
};
9397
9398
9398
9399
Ok(channel)
@@ -10469,11 +10470,10 @@ impl<'a, 'b, 'c, ES: Deref, SP: Deref> ReadableArgs<(&'a ES, &'b SP, u32, &'c Ch
10469
10470
// during a signing session, but have not received `tx_signatures` we MUST set `next_funding_txid`
10470
10471
// to the txid of that interactive transaction, else we MUST NOT set it.
10471
10472
next_funding_txid: None,
10472
-
10473
- #[cfg(splicing)]
10474
- pending_splice_pre: None,
10475
10473
},
10476
10474
interactive_tx_signing_session: None,
10475
+ #[cfg(splicing)]
10476
+ pending_splice_pre: None,
10477
10477
})
10478
10478
}
10479
10479
}
0 commit comments