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

Function fetch_block_handle

plugins/bwatch/bwatch.c:59–67  ·  view source on GitHub ↗

Fetch a block by height for normal polling. */

Source from the content-addressed store, hash-verified

57
58/* Fetch a block by height for normal polling. */
59static struct command_result *fetch_block_handle(struct command *cmd,
60 u32 height)
61{
62 struct out_req *req = jsonrpc_request_start(cmd, "getrawblockbyheight",
63 handle_block, handle_block,
64 int2ptr(height));
65 json_add_u32(req->js, "height", height);
66 return send_outreq(req);
67}
68
69/* Reschedule at the configured interval (used when there's nothing new to
70 * fetch, or on error). Once we're caught up to bitcoind's tip, this is

Callers 2

handle_blockFunction · 0.85
getchaininfo_doneFunction · 0.85

Calls 3

int2ptrFunction · 0.85
json_add_u32Function · 0.85
send_outreqFunction · 0.50

Tested by

no test coverage detected