| 407 | } |
| 408 | |
| 409 | static struct amount_sat fee_for_htlcs(const struct channel *channel, |
| 410 | const struct htlc **committed, |
| 411 | const struct htlc **adding, |
| 412 | const struct htlc **removing, |
| 413 | enum side side) |
| 414 | { |
| 415 | u32 feerate = channel_feerate(channel, side); |
| 416 | struct amount_sat dust_limit = channel->config[side].dust_limit; |
| 417 | size_t untrimmed; |
| 418 | bool option_anchor_outputs = channel_has(channel, OPT_ANCHOR_OUTPUTS); |
| 419 | |
| 420 | untrimmed = num_untrimmed_htlcs(side, dust_limit, feerate, |
| 421 | option_anchor_outputs, |
| 422 | committed, adding, removing); |
| 423 | |
| 424 | return commit_tx_base_fee(feerate, untrimmed, option_anchor_outputs); |
| 425 | } |
| 426 | |
| 427 | static bool htlc_dust(const struct channel *channel, |
| 428 | const struct htlc **committed, |
no test coverage detected