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

Function bwatch_send_chaininfo

plugins/bwatch/bwatch_interface.c:302–314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

300}
301
302struct command_result *bwatch_send_chaininfo(struct command *cmd,
303 void *unused UNUSED)
304{
305 struct bwatch *bwatch = bwatch_of(cmd->plugin);
306 struct out_req *req;
307
308 req = jsonrpc_request_start(cmd, "getchaininfo",
309 chaininfo_getchaininfo_done,
310 chaininfo_getchaininfo_failed,
311 NULL);
312 json_add_u32(req->js, "last_height", bwatch->current_height);
313 return send_outreq(req);
314}
315
316/*
317 * ============================================================================

Callers

nothing calls this directly

Calls 3

bwatch_ofFunction · 0.85
json_add_u32Function · 0.85
send_outreqFunction · 0.50

Tested by

no test coverage detected