| 258 | } |
| 259 | |
| 260 | static 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 | |
| 286 | static struct command_result *refresh_moves_(struct command *cmd, |
| 287 | struct command_result *(*cb)( |
nothing calls this directly
no test coverage detected