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

Function calc_feerate

wallet/wallet.c:627–639  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

625}
626
627static u32 calc_feerate(struct amount_sat excess_sats,
628 struct amount_sat output_sats_required,
629 size_t weight)
630{
631 struct amount_sat fee;
632 u32 feerate;
633
634 if (!amount_sat_sub(&fee, excess_sats, output_sats_required))
635 return 0;
636 if (!amount_feerate(&feerate, fee, weight))
637 abort();
638 return feerate;
639}
640
641/* Gather enough utxos to meet feerate, otherwise all we can. */
642struct utxo **wallet_utxo_boost(const tal_t *ctx,

Callers 1

wallet_utxo_boostFunction · 0.85

Calls 3

abortFunction · 0.85
amount_sat_subFunction · 0.50
amount_feerateFunction · 0.50

Tested by

no test coverage detected