Skip to content

Commit 152f6ef

Browse files
committed
Rename PendingSplice to PendingFunding
While PendingSplice is only used for splicing a FundedChannel, it will be useful when supporting RBF for V2 channel establishment.
1 parent 5303f82 commit 152f6ef

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

lightning/src/ln/channel.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2402,9 +2402,11 @@ impl AddSigned for u64 {
24022402
}
24032403
}
24042404

2405-
/// Info about a pending splice
2405+
/// Information about pending attempts at funding a channel. This includes funding currently under
2406+
/// negotiation and any negotiated attempts waiting enough on-chain confirmations. More than one
2407+
/// such attempt indicates use of RBF to increase the chances of confirmation.
24062408
#[cfg(splicing)]
2407-
struct PendingSplice {
2409+
struct PendingFunding {
24082410
funding_negotiation: Option<FundingNegotiation>,
24092411

24102412
/// Funding candidates that have been negotiated but have not reached enough confirmations
@@ -2437,7 +2439,7 @@ impl FundingNegotiation {
24372439
}
24382440

24392441
#[cfg(splicing)]
2440-
impl PendingSplice {
2442+
impl PendingFunding {
24412443
fn check_get_splice_locked<SP: Deref>(
24422444
&mut self, context: &ChannelContext<SP>, confirmed_funding_index: usize, height: u32,
24432445
) -> Option<msgs::SpliceLocked>
@@ -6454,7 +6456,7 @@ where
64546456
holder_commitment_point: HolderCommitmentPoint,
64556457
/// Info about an in-progress, pending splice (if any), on the pre-splice channel
64566458
#[cfg(splicing)]
6457-
pending_splice: Option<PendingSplice>,
6459+
pending_splice: Option<PendingFunding>,
64586460

64596461
/// Once we become quiescent, if we're the initiator, there's some action we'll want to take.
64606462
/// This keeps track of that action. Note that if we become quiescent and we're not the
@@ -11388,7 +11390,7 @@ where
1138811390
change_script,
1138911391
};
1139011392

11391-
self.pending_splice = Some(PendingSplice {
11393+
self.pending_splice = Some(PendingFunding {
1139211394
funding_negotiation: Some(FundingNegotiation::AwaitingAck(funding_negotiation_context)),
1139311395
negotiated_candidates: vec![],
1139411396
sent_funding_txid: None,
@@ -11613,7 +11615,7 @@ where
1161311615

1161411616
let funding_pubkey = splice_funding.get_holder_pubkeys().funding_pubkey;
1161511617

11616-
self.pending_splice = Some(PendingSplice {
11618+
self.pending_splice = Some(PendingFunding {
1161711619
funding_negotiation: Some(FundingNegotiation::ConstructingTransaction(
1161811620
splice_funding,
1161911621
interactive_tx_constructor,

0 commit comments

Comments
 (0)