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

Function amount_sat_add

common/amount.c:308–317  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

306}
307
308WARN_UNUSED_RESULT bool amount_sat_add(struct amount_sat *val,
309 struct amount_sat a,
310 struct amount_sat b)
311{
312 if (add_overflows_u64(a.satoshis, b.satoshis))
313 return false;
314
315 val->satoshis = a.satoshis + b.satoshis;
316 return true;
317}
318
319WARN_UNUSED_RESULT bool amount_sat_sub(struct amount_sat *val,
320 struct amount_sat a,

Callers 15

initial_commit_txFunction · 0.70
htlc_is_trimmedFunction · 0.70
amount_sat_add_sat_s64Function · 0.70
lease_rates_calc_feeFunction · 0.70
calculate_amountsFunction · 0.70
create_close_txFunction · 0.70
adjust_feerangeFunction · 0.50
adjust_offerFunction · 0.50
bitcoin_tx_compute_feeFunction · 0.50
psbt_compute_feeFunction · 0.50
wallet_utxo_boostFunction · 0.50

Calls 1

add_overflows_u64Function · 0.85

Tested by 1

mainFunction · 0.40