Skip to content

Commit f204eee

Browse files
committed
Add basic end-to-end splice tests
This adds a new test for both splice-in and splice-out in favor of maintaining the existing test. Helpers have been added to DRY up a lot of the logic necessary for driving the splice state machine forward.
1 parent 322519a commit f204eee

File tree

3 files changed

+382
-253
lines changed

3 files changed

+382
-253
lines changed

lightning/src/ln/channel.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6088,8 +6088,6 @@ where
60886088
holder_commitment_transaction_number,
60896089
self.counterparty_next_commitment_transaction_number,
60906090
);
6091-
// TODO(splicing) Forced error, as the use case is not complete
6092-
return Err(AbortReason::InternalError("Splicing not yet supported"));
60936091
} else {
60946092
self.assert_no_commitment_advancement(holder_commitment_transaction_number, "initial commitment_signed");
60956093
}

lightning/src/ln/funding.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ use crate::prelude::Vec;
1717
use crate::sign::{P2TR_KEY_PATH_WITNESS_WEIGHT, P2WPKH_WITNESS_WEIGHT};
1818

1919
/// The components of a splice's funding transaction that are contributed by one party.
20+
#[derive(Debug, Clone)]
2021
pub enum SpliceContribution {
2122
/// When funds are added to a channel.
2223
SpliceIn {
@@ -85,7 +86,7 @@ impl SpliceContribution {
8586

8687
/// An input to contribute to a channel's funding transaction either when using the v2 channel
8788
/// establishment protocol or when splicing.
88-
#[derive(Clone)]
89+
#[derive(Debug, Clone)]
8990
pub struct FundingTxInput {
9091
/// The unspent [`TxOut`] that the input spends.
9192
///

0 commit comments

Comments
 (0)