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

Function amount_sat_to_msat

common/amount.c:13–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Calls 1

mul_overflows_u64Function · 0.85

Tested by

no test coverage detected