Skip to content

Commit 234b0f9

Browse files
committed
f - remove expect
1 parent e91e49b commit 234b0f9

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
@@ -1206,12 +1206,12 @@ impl InMemorySigner {
12061206
return Err(());
12071207
}
12081208

1209-
// TODO: Is this ok?
1210-
let channel_parameters =
1211-
descriptor.channel_transaction_parameters.as_ref().expect(MISSING_PARAMS_ERR);
1212-
let remotepubkey = bitcoin::PublicKey::new(channel_parameters.holder_pubkeys.payment_point);
1213-
let supports_anchors_zero_fee_htlc_tx =
1214-
channel_parameters.channel_type_features.supports_anchors_zero_fee_htlc_tx();
1209+
let remotepubkey = bitcoin::PublicKey::new(self.pubkeys().payment_point);
1210+
let supports_anchors_zero_fee_htlc_tx = descriptor
1211+
.channel_transaction_parameters
1212+
.as_ref()
1213+
.map(|params| params.channel_type_features.supports_anchors_zero_fee_htlc_tx())
1214+
.unwrap_or(false);
12151215

12161216
let witness_script = if supports_anchors_zero_fee_htlc_tx {
12171217
chan_utils::get_to_countersignatory_with_anchors_redeemscript(&remotepubkey.inner)

0 commit comments

Comments
 (0)