MCPcopy Create free account
hub / github.com/ElementsProject/lightning / fee_for_htlcs

Function fee_for_htlcs

channeld/full_channel.c:409–425  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

407}
408
409static 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
427static bool htlc_dust(const struct channel *channel,
428 const struct htlc **committed,

Callers 1

add_htlcFunction · 0.85

Calls 4

channel_feerateFunction · 0.85
num_untrimmed_htlcsFunction · 0.85
commit_tx_base_feeFunction · 0.85
channel_hasFunction · 0.50

Tested by

no test coverage detected