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

Function json_add_sat_only

lightningd/peer_control.c:492–501  ·  view source on GitHub ↗

We do this replication manually because it's an array. */

Source from the content-addressed store, hash-verified

490
491/* We do this replication manually because it's an array. */
492static void json_add_sat_only(struct json_stream *result,
493 const char *fieldname,
494 struct amount_sat sat)
495{
496 struct amount_msat msat;
497
498 if (amount_sat_to_msat(&msat, sat))
499 json_add_string(result, fieldname,
500 type_to_string(tmpctx, struct amount_msat, &msat));
501}
502
503/* Fee a commitment transaction would currently cost */
504static struct amount_sat commit_txfee(const struct channel *channel,

Callers 1

json_add_channelFunction · 0.85

Calls 3

amount_sat_to_msatFunction · 0.50
json_add_stringFunction · 0.50
type_to_stringClass · 0.50

Tested by

no test coverage detected