Skip to content

Commit 7152b54

Browse files
committed
Check correct commitment number/point in initial commitment_signed
When splicing a channel, the initial commitment_signed received should use the same commitment number and point previously received prior to splicing the channel. Account for this by checking the commitment_signed against that one instead, which is now stored separately in FundedChannel.
1 parent 73dc1ff commit 7152b54

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lightning/src/ln/channel.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7003,9 +7003,13 @@ where
70037003
})
70047004
.and_then(|funding_negotiation| funding_negotiation.as_funding())
70057005
.expect("Funding must exist for negotiated pending splice");
7006+
let holder_commitment_point = self
7007+
.previous_holder_commitment_point
7008+
.as_ref()
7009+
.expect("previous should be set after receiving the initial commitment_signed");
70067010
let (holder_commitment_tx, _) = self.context.validate_commitment_signed(
70077011
pending_splice_funding,
7008-
&self.next_holder_commitment_point,
7012+
holder_commitment_point,
70097013
msg,
70107014
logger,
70117015
)?;

0 commit comments

Comments
 (0)