Skip to content

Commit 4268120

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 2c7e49b commit 4268120

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
@@ -2546,8 +2546,10 @@ impl AddSigned for u64 {
25462546
}
25472547
}
25482548

2549-
/// Info about a pending splice
2550-
struct PendingSplice {
2549+
/// Information about pending attempts at funding a channel. This includes funding currently under
2550+
/// negotiation and any negotiated attempts waiting enough on-chain confirmations. More than one
2551+
/// such attempt indicates use of RBF to increase the chances of confirmation.
2552+
struct PendingFunding {
25512553
funding_negotiation: Option<FundingNegotiation>,
25522554

25532555
/// Funding candidates that have been negotiated but have not reached enough confirmations
@@ -2577,7 +2579,7 @@ impl FundingNegotiation {
25772579
}
25782580
}
25792581

2580-
impl PendingSplice {
2582+
impl PendingFunding {
25812583
fn check_get_splice_locked<SP: Deref>(
25822584
&mut self, context: &ChannelContext<SP>, confirmed_funding_index: usize, height: u32,
25832585
) -> Option<msgs::SpliceLocked>
@@ -6649,7 +6651,7 @@ where
66496651
pub interactive_tx_signing_session: Option<InteractiveTxSigningSession>,
66506652
holder_commitment_point: HolderCommitmentPoint,
66516653
/// Info about an in-progress, pending splice (if any), on the pre-splice channel
6652-
pending_splice: Option<PendingSplice>,
6654+
pending_splice: Option<PendingFunding>,
66536655

66546656
/// Once we become quiescent, if we're the initiator, there's some action we'll want to take.
66556657
/// This keeps track of that action. Note that if we become quiescent and we're not the
@@ -11543,7 +11545,7 @@ where
1154311545
change_script,
1154411546
};
1154511547

11546-
self.pending_splice = Some(PendingSplice {
11548+
self.pending_splice = Some(PendingFunding {
1154711549
funding_negotiation: Some(FundingNegotiation::AwaitingAck(funding_negotiation_context)),
1154811550
negotiated_candidates: vec![],
1154911551
sent_funding_txid: None,
@@ -11763,7 +11765,7 @@ where
1176311765

1176411766
let funding_pubkey = splice_funding.get_holder_pubkeys().funding_pubkey;
1176511767

11766-
self.pending_splice = Some(PendingSplice {
11768+
self.pending_splice = Some(PendingFunding {
1176711769
funding_negotiation: Some(FundingNegotiation::ConstructingTransaction(
1176811770
splice_funding,
1176911771
interactive_tx_constructor,

0 commit comments

Comments
 (0)