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

Function fetch_block_rescan

plugins/bwatch/bwatch.c:336–349  ·  view source on GitHub ↗

Fetch a single block by height during a rescan. */

Source from the content-addressed store, hash-verified

334
335/* Fetch a single block by height during a rescan. */
336static struct command_result *fetch_block_rescan(struct command *cmd,
337 u32 height,
338 struct command_result *(*cb)(struct command *,
339 const char *,
340 const char *,
341 const jsmntok_t *,
342 struct rescan_state *),
343 struct rescan_state *rescan)
344{
345 struct out_req *req = jsonrpc_request_start(cmd, "getrawblockbyheight",
346 cb, cb, rescan);
347 json_add_u32(req->js, "height", height);
348 return send_outreq(req);
349}
350
351/* Finish a rescan chain: RPC commands get a JSON result; aux/timer
352 * commands just terminate. */

Callers 2

rescan_block_doneFunction · 0.85
bwatch_start_rescanFunction · 0.85

Calls 2

json_add_u32Function · 0.85
send_outreqFunction · 0.50

Tested by

no test coverage detected