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

Function send_more_cmd

plugins/commando.c:627–646  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

625};
626
627static struct command_result *send_more_cmd(struct command *cmd,
628 const char *method UNUSED,
629 const char *buf UNUSED,
630 const jsmntok_t *result UNUSED,
631 struct outgoing *outgoing)
632{
633 struct out_req *req;
634
635 if (outgoing->msg_off == tal_count(outgoing->msgs)) {
636 tal_free(outgoing);
637 return command_still_pending(cmd);
638 }
639
640 req = jsonrpc_request_start(cmd, "sendcustommsg",
641 send_more_cmd, forward_error, outgoing);
642 json_add_node_id(req->js, "node_id", &outgoing->peer);
643 json_add_hex_talarr(req->js, "msg", outgoing->msgs[outgoing->msg_off++]);
644
645 return send_outreq(req);
646}
647
648static struct command_result *json_commando(struct command *cmd,
649 const char *buffer,

Callers 1

json_commandoFunction · 0.85

Calls 5

tal_freeFunction · 0.85
json_add_node_idFunction · 0.85
json_add_hex_talarrFunction · 0.85
command_still_pendingFunction · 0.70
send_outreqFunction · 0.70

Tested by

no test coverage detected