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

Function amount_msat_sub_sat

common/amount.c:299–309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

297}
298
299WARN_UNUSED_RESULT bool amount_msat_sub_sat(struct amount_msat *val,
300 struct amount_msat a,
301 struct amount_sat b)
302{
303 struct amount_msat msatb;
304
305 if (!amount_sat_to_msat(&msatb, b))
306 return false;
307
308 return amount_msat_sub(val, a, msatb);
309}
310
311WARN_UNUSED_RESULT bool amount_sat_sub_msat(struct amount_msat *val,
312 struct amount_sat a,

Callers 7

get_room_above_reserveFunction · 0.85
add_htlcFunction · 0.85
channel_amount_spendableFunction · 0.85
select_inchanFunction · 0.85
try_subtract_feeFunction · 0.85
mainFunction · 0.85

Calls 2

amount_msat_subFunction · 0.85
amount_sat_to_msatFunction · 0.70

Tested by

no test coverage detected