Skip to content

Commit 6caaa54

Browse files
committed
Use channel parameters in sign_counterparty_payment_input
Now that channel_value_satoshis has been moved to ChannelTransactionParameters, InMemorySigner no longer needs a copy. Remove uses of the copy from sign_counterparty_payment_input.
1 parent e74c698 commit 6caaa54

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lightning/src/sign/mod.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,11 +1207,10 @@ impl InMemorySigner {
12071207
}
12081208

12091209
let remotepubkey = bitcoin::PublicKey::new(self.pubkeys().payment_point);
1210-
// We cannot always assume that `channel_parameters` is set, so can't just call
1211-
// `self.channel_parameters()` or anything that relies on it
1212-
let supports_anchors_zero_fee_htlc_tx = self
1213-
.channel_type_features()
1214-
.map(|features| features.supports_anchors_zero_fee_htlc_tx())
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())
12151214
.unwrap_or(false);
12161215

12171216
let witness_script = if supports_anchors_zero_fee_htlc_tx {

0 commit comments

Comments
 (0)