Skip to content

Commit b0166dd

Browse files
committed
Return ChannelError instead of calling expect
1 parent 3ae8c4a commit b0166dd

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lightning/src/ln/channel.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6984,10 +6984,9 @@ where
69846984
.and_then(|funding_negotiation| funding_negotiation.as_funding())
69856985
.expect("Funding must exist for negotiated pending splice");
69866986
let transaction_number = self.holder_commitment_point.current_transaction_number();
6987-
let commitment_point = self
6988-
.holder_commitment_point
6989-
.current_point()
6990-
.expect("current should be set after receiving the initial commitment_signed");
6987+
let commitment_point = self.holder_commitment_point.current_point().ok_or_else(|| {
6988+
ChannelError::close("current_point should be set for channels initiating splicing")
6989+
})?;
69916990
let (holder_commitment_tx, _) = self.context.validate_commitment_signed(
69926991
pending_splice_funding,
69936992
transaction_number,

0 commit comments

Comments
 (0)