Skip to content

Commit 1261386

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 f65c60b commit 1261386

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
@@ -831,7 +831,7 @@ pub(crate) fn build_htlc_output(
831831
} else {
832832
htlc_success_tx_weight(channel_type_features)
833833
};
834-
let output_value = if channel_type_features.supports_anchors_zero_fee_htlc_tx() && !channel_type_features.supports_anchors_nonzero_fee_htlc_tx() {
834+
let output_value = if channel_type_features.supports_anchors_zero_fee_htlc_tx() {
835835
htlc.to_bitcoin_amount()
836836
} else {
837837
let total_fee = Amount::from_sat(feerate_per_kw as u64 * weight / 1000);

0 commit comments

Comments
 (0)