Skip to content

Commit e9ec377

Browse files
committed
Remove invalid splice debug assertion in funding_tx_constructed
We incorrectly assumed that both commitments must be at the same height, but this is certainly possible whenever updates are proposed in both directions at the same time.
1 parent fa676a0 commit e9ec377

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

lightning/src/ln/channel.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6191,20 +6191,15 @@ where
61916191

61926192
#[rustfmt::skip]
61936193
fn funding_tx_constructed<L: Deref>(
6194-
&mut self, funding: &mut FundingScope, funding_outpoint: OutPoint, is_splice: bool,
6194+
&mut self, funding: &mut FundingScope, funding_outpoint: OutPoint,
61956195
holder_commitment_transaction_number: u64, logger: &L,
61966196
) -> Result<msgs::CommitmentSigned, AbortReason>
61976197
where
61986198
L::Target: Logger
61996199
{
62006200
funding.channel_transaction_parameters.funding_outpoint = Some(funding_outpoint);
62016201

6202-
if is_splice {
6203-
debug_assert_eq!(
6204-
holder_commitment_transaction_number,
6205-
self.counterparty_next_commitment_transaction_number,
6206-
);
6207-
} else {
6202+
if !is_splice {
62086203
self.assert_no_commitment_advancement(holder_commitment_transaction_number, "initial commitment_signed");
62096204
self.channel_state = ChannelState::FundingNegotiated(FundingNegotiatedFlags::new());
62106205
}

0 commit comments

Comments
 (0)