Skip to content

Commit 9bc514e

Browse files
committed
f - remove expects else
1 parent b1df43f commit 9bc514e

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

lightning/src/ln/channel.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -2751,8 +2751,7 @@ impl<SP: Deref> ChannelContext<SP> where SP::Target: SignerProvider {
27512751
/// The result is a transaction which we can revoke broadcastership of (ie a "local" transaction)
27522752
/// TODO Some magic rust shit to compile-time check this?
27532753
fn build_holder_transaction_keys(&self) -> TxCreationKeys {
2754-
let per_commitment_point = self.holder_commitment_point.current_point()
2755-
.expect("Should not build commitment transaction before retrieving first commitment point");
2754+
let per_commitment_point = self.holder_commitment_point.current_point();
27562755
let delayed_payment_base = &self.get_holder_pubkeys().delayed_payment_basepoint;
27572756
let htlc_basepoint = &self.get_holder_pubkeys().htlc_basepoint;
27582757
let counterparty_pubkeys = self.get_counterparty_pubkeys();
@@ -5412,8 +5411,7 @@ impl<SP: Deref> Channel<SP> where
54125411
debug_assert!(self.context.holder_commitment_point.transaction_number() <= INITIAL_COMMITMENT_NUMBER + 2);
54135412
// TODO: handle non-available case when get_per_commitment_point becomes async
54145413
debug_assert!(self.context.holder_commitment_point.is_available());
5415-
let next_per_commitment_point = self.context.holder_commitment_point.current_point()
5416-
.expect("TODO");
5414+
let next_per_commitment_point = self.context.holder_commitment_point.current_point();
54175415
let per_commitment_secret = self.context.holder_signer.as_ref().release_commitment_secret(self.context.holder_commitment_point.transaction_number() + 2);
54185416
msgs::RevokeAndACK {
54195417
channel_id: self.context.channel_id,
@@ -7616,7 +7614,7 @@ impl<SP: Deref> OutboundV1Channel<SP> where SP::Target: SignerProvider {
76167614
}
76177615

76187616
debug_assert!(self.context.holder_commitment_point.is_available());
7619-
let first_per_commitment_point = self.context.holder_commitment_point.current_point().expect("TODO");
7617+
let first_per_commitment_point = self.context.holder_commitment_point.current_point();
76207618
let keys = self.context.get_holder_pubkeys();
76217619

76227620
msgs::OpenChannel {
@@ -8015,7 +8013,7 @@ impl<SP: Deref> InboundV1Channel<SP> where SP::Target: SignerProvider {
80158013
/// [`msgs::AcceptChannel`]: crate::ln::msgs::AcceptChannel
80168014
fn generate_accept_channel_message(&self) -> msgs::AcceptChannel {
80178015
debug_assert!(self.context.holder_commitment_point.is_available());
8018-
let first_per_commitment_point = self.context.holder_commitment_point.current_point().expect("TODO");
8016+
let first_per_commitment_point = self.context.holder_commitment_point.current_point();
80198017
let keys = self.context.get_holder_pubkeys();
80208018

80218019
msgs::AcceptChannel {

0 commit comments

Comments
 (0)