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

Function amount_sat_add

common/amount.c:277–286  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

275}
276
277WARN_UNUSED_RESULT bool amount_sat_add(struct amount_sat *val,
278 struct amount_sat a,
279 struct amount_sat b)
280{
281 if (add_overflows_u64(a.satoshis, b.satoshis))
282 return false;
283
284 val->satoshis = a.satoshis + b.satoshis;
285 return true;
286}
287
288WARN_UNUSED_RESULT bool amount_sat_sub(struct amount_sat *val,
289 struct amount_sat a,

Callers 15

initial_commit_txFunction · 0.70
htlc_is_trimmedFunction · 0.70
lease_rates_calc_feeFunction · 0.70
create_close_txFunction · 0.70
tx_to_usFunction · 0.50
inputs_sufficientFunction · 0.50
json_fundpsbtFunction · 0.50
json_utxopsbtFunction · 0.50
commit_txFunction · 0.50
penalty_tx_createFunction · 0.50

Calls 1

add_overflows_u64Function · 0.85

Tested by 1

mainFunction · 0.40