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

Function json_add_amount_msat_only

common/json_stream.c:568–579  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

566}
567
568void json_add_amount_msat_only(struct json_stream *result,
569 const char *msatfieldname,
570 struct amount_msat msat)
571{
572 if (!deprecated_apis)
573 assert(strends(msatfieldname, "_msat"));
574 if (deprecated_apis)
575 json_add_string(result, msatfieldname,
576 type_to_string(tmpctx, struct amount_msat, &msat));
577 else
578 json_add_u64(result, msatfieldname, msat.millisatoshis); /* Raw: low-level helper */
579}
580
581void json_add_amount_sat_compat(struct json_stream *result,
582 struct amount_sat sat,

Callers 3

json_add_amount_sat_msatFunction · 0.70
json_add_lease_ratesFunction · 0.70

Calls 4

strendsFunction · 0.85
json_add_stringFunction · 0.70
type_to_stringClass · 0.70
json_add_u64Function · 0.70

Tested by

no test coverage detected