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

Function amount_msat_add

common/amount.c:255–264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

253}
254
255WARN_UNUSED_RESULT bool amount_msat_add(struct amount_msat *val,
256 struct amount_msat a,
257 struct amount_msat b)
258{
259 if (add_overflows_u64(a.millisatoshis, b.millisatoshis))
260 return false;
261
262 val->millisatoshis = a.millisatoshis + b.millisatoshis;
263 return true;
264}
265
266WARN_UNUSED_RESULT bool amount_msat_sub(struct amount_msat *val,
267 struct amount_msat a,

Callers 15

commit_tx_amount_trimmedFunction · 0.85
commit_txFunction · 0.85
sum_offered_msatoshisFunction · 0.85
add_htlcFunction · 0.85
send_payment_coreFunction · 0.85
routehint_candidatesFunction · 0.85
remove_htlc_inFunction · 0.85
htlc_set_addFunction · 0.85
channel_record_openFunction · 0.85
invoice_check_paymentFunction · 0.85
select_inchanFunction · 0.85

Calls 1

add_overflows_u64Function · 0.85

Tested by

no test coverage detected