Skip to content

Commit 4a8a50c

Browse files
committed
ln: remove unnecessary nonzero anchor channel check in build_htlc_output
LDK does not support a channel type that supports both zero fee and nonzero fee anchors (as this is impossible), so we can drop the unnecessary check in build_htlc_output.
1 parent b497c73 commit 4a8a50c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightning/src/ln/chan_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ pub(crate) fn build_htlc_output(
829829
} else {
830830
htlc_success_tx_weight(channel_type_features)
831831
};
832-
let output_value = if channel_type_features.supports_anchors_zero_fee_htlc_tx() && !channel_type_features.supports_anchors_nonzero_fee_htlc_tx() {
832+
let output_value = if channel_type_features.supports_anchors_zero_fee_htlc_tx() {
833833
htlc.to_bitcoin_amount()
834834
} else {
835835
let total_fee = Amount::from_sat(feerate_per_kw as u64 * weight / 1000);

0 commit comments

Comments
 (0)