From e7841048936331e40998afe27194e47fadfdf1f3 Mon Sep 17 00:00:00 2001 From: Alec Chen Date: Tue, 9 Jul 2024 18:24:39 -0700 Subject: [PATCH] f - add expects in splicing/dual funding --- lightning/src/ln/channel.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lightning/src/ln/channel.rs b/lightning/src/ln/channel.rs index 97004ae5602..47fb5118a68 100644 --- a/lightning/src/ln/channel.rs +++ b/lightning/src/ln/channel.rs @@ -8239,10 +8239,12 @@ impl OutboundV2Channel where SP::Target: SignerProvider { let first_per_commitment_point = self.context.holder_signer.as_ref() .get_per_commitment_point(self.context.holder_commitment_point.transaction_number(), - &self.context.secp_ctx); + &self.context.secp_ctx) + .expect("TODO: async signing is not yet supported for commitment points in v2 channel establishment"); let second_per_commitment_point = self.context.holder_signer.as_ref() .get_per_commitment_point(self.context.holder_commitment_point.transaction_number() - 1, - &self.context.secp_ctx); + &self.context.secp_ctx) + .expect("TODO: async signing is not yet supported for commitment points in v2 channel establishment"); let keys = self.context.get_holder_pubkeys(); msgs::OpenChannelV2 { @@ -8389,9 +8391,11 @@ impl InboundV2Channel where SP::Target: SignerProvider { /// [`msgs::AcceptChannelV2`]: crate::ln::msgs::AcceptChannelV2 fn generate_accept_channel_v2_message(&self) -> msgs::AcceptChannelV2 { let first_per_commitment_point = self.context.holder_signer.as_ref().get_per_commitment_point( - self.context.holder_commitment_point.transaction_number(), &self.context.secp_ctx); + self.context.holder_commitment_point.transaction_number(), &self.context.secp_ctx) + .expect("TODO: async signing is not yet supported for commitment points in v2 channel establishment"); let second_per_commitment_point = self.context.holder_signer.as_ref().get_per_commitment_point( - self.context.holder_commitment_point.transaction_number() - 1, &self.context.secp_ctx); + self.context.holder_commitment_point.transaction_number() - 1, &self.context.secp_ctx) + .expect("TODO: async signing is not yet supported for commitment points in v2 channel establishment"); let keys = self.context.get_holder_pubkeys(); msgs::AcceptChannelV2 {