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

Function amount_sat_to_msat

common/amount.c:12–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10#include <wire/wire.h>
11
12bool amount_sat_to_msat(struct amount_msat *msat,
13 struct amount_sat sat)
14{
15 if (mul_overflows_u64(sat.satoshis, MSAT_PER_SAT))
16 return false;
17 msat->millisatoshis = sat.satoshis * MSAT_PER_SAT;
18 return true;
19}
20
21bool amount_msat_to_sat(struct amount_sat *sat,
22 struct amount_msat msat)

Callers 15

amount_msat_sub_satFunction · 0.70
amount_sat_sub_msatFunction · 0.70
amount_msat_add_satFunction · 0.70
amount_msat_greater_satFunction · 0.70
amount_msat_less_satFunction · 0.70
amount_msat_less_eq_satFunction · 0.70
amount_msat_eq_satFunction · 0.70
new_chain_coin_mvt_satFunction · 0.70
json_add_amount_sat_msatFunction · 0.70
handle_preimageFunction · 0.50

Calls 1

mul_overflows_u64Function · 0.85

Tested by

no test coverage detected