Skip to content

Commit 2316fb3

Browse files
committed
f - remove expect
1 parent d694900 commit 2316fb3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lightning/src/sign/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,12 +1224,12 @@ impl InMemorySigner {
12241224
return Err(());
12251225
}
12261226

1227-
// TODO: Is this ok?
1228-
let channel_parameters =
1229-
descriptor.channel_transaction_parameters.as_ref().expect(MISSING_PARAMS_ERR);
1230-
let remotepubkey = bitcoin::PublicKey::new(channel_parameters.holder_pubkeys.payment_point);
1231-
let supports_anchors_zero_fee_htlc_tx =
1232-
channel_parameters.channel_type_features.supports_anchors_zero_fee_htlc_tx();
1227+
let remotepubkey = bitcoin::PublicKey::new(self.pubkeys().payment_point);
1228+
let supports_anchors_zero_fee_htlc_tx = descriptor
1229+
.channel_transaction_parameters
1230+
.as_ref()
1231+
.map(|params| params.channel_type_features.supports_anchors_zero_fee_htlc_tx())
1232+
.unwrap_or(false);
12331233

12341234
let witness_script = if supports_anchors_zero_fee_htlc_tx {
12351235
chan_utils::get_to_countersignatory_with_anchors_redeemscript(&remotepubkey.inner)

0 commit comments

Comments
 (0)