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

Function listforwardings_add_forwardings

lightningd/forwards.c:146–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146static void listforwardings_add_forwardings(struct json_stream *response,
147 struct wallet *wallet,
148 enum forward_status status,
149 const struct short_channel_id *chan_in,
150 const struct short_channel_id *chan_out,
151 const enum wait_index *listindex,
152 u64 liststart,
153 const u32 *listlimit)
154{
155 struct db_stmt *stmt;
156
157 stmt = forwarding_first(wallet, status, chan_in, chan_out, listindex, liststart, listlimit);
158
159 json_array_start(response, "forwards");
160 while (stmt) {
161 const struct forwarding *cur = forwarding_details(tmpctx, wallet, stmt);
162 json_object_start(response, NULL);
163 json_add_forwarding_fields(response, cur, NULL, NULL);
164 json_object_end(response);
165 tal_free(cur);
166 stmt = forwarding_next(wallet, stmt);
167 }
168 json_array_end(response);
169}
170
171static struct command_result *param_forward_status(struct command *cmd,
172 const char *name,

Callers 1

json_listforwardsFunction · 0.85

Calls 9

forwarding_firstFunction · 0.85
json_array_startFunction · 0.85
forwarding_detailsFunction · 0.85
json_object_startFunction · 0.85
json_object_endFunction · 0.85
tal_freeFunction · 0.85
forwarding_nextFunction · 0.85
json_array_endFunction · 0.85

Tested by

no test coverage detected