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

Function fmt_height_states

common/blockheight_states.c:150–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148}
149
150static const char *fmt_height_states(const tal_t *ctx,
151 const struct height_states *states)
152{
153 char *ret = tal_strdup(ctx, "{");
154 for (enum htlc_state i = 0; i < ARRAY_SIZE(states->height); i++) {
155 if (states->height[i] != NULL)
156 tal_append_fmt(&ret, " %s:%u",
157 htlc_state_name(i),
158 *states->height[i]);
159 }
160 tal_append_fmt(&ret, " }");
161 return ret;
162}
163REGISTER_TYPE_TO_STRING(height_states, fmt_height_states);

Callers

nothing calls this directly

Calls 2

tal_append_fmtFunction · 0.85
htlc_state_nameFunction · 0.70

Tested by

no test coverage detected