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

Function amount_sat_add_sat_s64

common/amount.c:411–419  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

409
410
411WARN_UNUSED_RESULT bool amount_sat_add_sat_s64(struct amount_sat *val,
412 struct amount_sat a,
413 s64 b)
414{
415 if (b < 0)
416 return amount_sat_sub(val, a, amount_sat(-b));
417 else
418 return amount_sat_add(val, a, amount_sat(b));
419}
420
421bool amount_msat_can_add_sat_s64(struct amount_msat a, s64 b)
422{

Callers 1

Calls 3

amount_sat_subFunction · 0.70
amount_satFunction · 0.70
amount_sat_addFunction · 0.70

Tested by

no test coverage detected