Skip to content

Commit 58da9c9

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 38d79ca commit 58da9c9

File tree

3 files changed

+381
-268
lines changed

3 files changed

+381
-268
lines changed

lightning/src/ln/channel.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5913,8 +5913,6 @@ where
59135913
holder_commitment_transaction_number,
59145914
self.counterparty_next_commitment_transaction_number,
59155915
);
5916-
// TODO(splicing) Forced error, as the use case is not complete
5917-
return Err(AbortReason::InternalError("Splicing not yet supported"));
59185916
} else {
59195917
self.assert_no_commitment_advancement(holder_commitment_transaction_number, "initial commitment_signed");
59205918
}

lightning/src/ln/funding.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ use crate::events::bump_transaction::{Utxo, EMPTY_SCRIPT_SIG_WEIGHT};
1616
use crate::sign::{P2TR_KEY_PATH_WITNESS_WEIGHT, P2WPKH_WITNESS_WEIGHT};
1717

1818
/// The components of a splice's funding transaction that are contributed by one party.
19+
#[derive(Debug, Clone)]
1920
pub enum SpliceContribution {
2021
/// When funds are added to a channel.
2122
SpliceIn {
@@ -82,7 +83,7 @@ impl SpliceContribution {
8283

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

0 commit comments

Comments
 (0)