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

Function listchainmoves_done

plugins/bkpr/bookkeeper.c:260–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258}
259
260static struct command_result *listchainmoves_done(struct command *cmd,
261 const char *method,
262 const char *buf,
263 const jsmntok_t *result,
264 struct refresh_info *rinfo)
265{
266 const jsmntok_t *moves, *t;
267 size_t i;
268 struct bkpr *bkpr = bkpr_of(cmd->plugin);
269 be64 be_index;
270
271 moves = json_get_member(buf, result, "chainmoves");
272 json_for_each_arr(i, t, moves)
273 parse_and_log_chain_move(cmd, buf, t, rinfo);
274
275 be_index = cpu_to_be64(bkpr->chainmoves_index);
276 jsonrpc_set_datastore_binary(cmd,
277 mkdatastorekey(tmpctx, "bookkeeper", "chainmoves_index"),
278 &be_index, sizeof(be_index),
279 "create-or-replace",
280 datastore_done, NULL, use_rinfo(rinfo));
281
282 limited_listchannelmoves(cmd, rinfo);
283 return rinfo_one_done(cmd, rinfo);
284}
285
286static struct command_result *refresh_moves_(struct command *cmd,
287 struct command_result *(*cb)(

Callers

nothing calls this directly

Calls 7

json_get_memberFunction · 0.85
parse_and_log_chain_moveFunction · 0.85
cpu_to_be64Function · 0.85
use_rinfoFunction · 0.85
limited_listchannelmovesFunction · 0.85
rinfo_one_doneFunction · 0.85
bkpr_ofFunction · 0.70

Tested by

no test coverage detected