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

Function amount_tx_fee

common/amount.c:560–569  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

558}
559
560struct amount_sat amount_tx_fee(u32 fee_per_kw, size_t weight)
561{
562 struct amount_sat fee;
563
564 /* If this overflows, weight must be > 2^32, which is not a real tx */
565 assert(!mul_overflows_u64(fee_per_kw, weight));
566 fee.satoshis = (u64)fee_per_kw * weight / 1000;
567
568 return fee;
569}
570
571bool amount_asset_is_main(struct amount_asset *amount)
572{

Callers 15

commit_tx_base_feeFunction · 0.70
lease_rates_calc_feeFunction · 0.70
htlc_timeout_feeFunction · 0.70
htlc_success_feeFunction · 0.70
trim_maximum_feerateFunction · 0.50
grind_htlc_tx_feeFunction · 0.50
tx_to_usFunction · 0.50
min_rbf_bumpFunction · 0.50
inputs_sufficientFunction · 0.50
finish_psbtFunction · 0.50
json_fundpsbtFunction · 0.50
penalty_tx_createFunction · 0.50

Calls 1

mul_overflows_u64Function · 0.85

Tested by

no test coverage detected