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

Function fmt_amount_sat_btc

common/amount.c:86–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86const char *fmt_amount_sat_btc(const tal_t *ctx,
87 struct amount_sat sat,
88 bool append_unit)
89{
90 if (sat.satoshis == 0)
91 return tal_fmt(ctx, append_unit ? "0btc" : "0");
92
93 return tal_fmt(ctx, "%"PRIu64".%08"PRIu64"%s",
94 sat.satoshis / SAT_PER_BTC,
95 sat.satoshis % SAT_PER_BTC,
96 append_unit ? "btc" : "");
97}
98
99char *fmt_amount_sat(const tal_t *ctx, struct amount_sat sat)
100{

Callers 2

runFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by 1

mainFunction · 0.68