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

Function fmt_force_feerates

lightningd/options.c:153–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151}
152
153static char *fmt_force_feerates(const tal_t *ctx, const u32 *force_feerates)
154{
155 char *ret;
156 size_t last;
157
158 if (!force_feerates)
159 return NULL;
160
161 ret = tal_fmt(ctx, "%i", force_feerates[0]);
162 last = 0;
163 for (size_t i = 1; i < tal_count(force_feerates); i++) {
164 if (force_feerates[i] == force_feerates[i-1])
165 continue;
166 /* Different? Catchup! */
167 for (size_t j = last + 1; j <= i; j++)
168 tal_append_fmt(&ret, "/%i", force_feerates[j]);
169 last = i;
170 }
171 return ret;
172}
173
174static char *opt_set_accept_extra_tlv_types(const char *arg,
175 struct lightningd *ld)

Callers 1

add_configFunction · 0.85

Calls 1

tal_append_fmtFunction · 0.85

Tested by

no test coverage detected