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

Function amount_msat_add

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

Source from the content-addressed store, hash-verified

266}
267
268WARN_UNUSED_RESULT bool amount_msat_add(struct amount_msat *val,
269 struct amount_msat a,
270 struct amount_msat b)
271{
272 if (add_overflows_u64(a.millisatoshis, b.millisatoshis))
273 return false;
274
275 val->millisatoshis = a.millisatoshis + b.millisatoshis;
276 return true;
277}
278
279WARN_UNUSED_RESULT bool amount_msat_accumulate(struct amount_msat *a,
280 struct amount_msat b)

Callers 15

commit_txFunction · 0.85
calc_balanceFunction · 0.85
check_balancesFunction · 0.85
add_htlcFunction · 0.85
cstat_accumulateFunction · 0.85
channel_record_openFunction · 0.85
invoice_check_paymentFunction · 0.85
add_routehintsFunction · 0.85
runFunction · 0.85
initial_commit_txFunction · 0.85
amount_msat_accumulateFunction · 0.85
amount_msat_add_satFunction · 0.85

Calls 1

add_overflows_u64Function · 0.85

Tested by 6

mainFunction · 0.68
test_amount_sub_feeFunction · 0.68
route_scoreFunction · 0.68
mainFunction · 0.68
test_flow_to_routeFunction · 0.68