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

Function json_addgossip

lightningd/gossip_control.c:481–497  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

479}
480
481static struct command_result *json_addgossip(struct command *cmd,
482 const char *buffer,
483 const jsmntok_t *obj UNNEEDED,
484 const jsmntok_t *params)
485{
486 u8 *req, *gossip_msg;
487 if (!param(cmd, buffer, params,
488 p_req("message", param_bin_from_hex, &gossip_msg),
489 NULL))
490 return command_param_failed();
491
492 req = towire_gossipd_addgossip(cmd, gossip_msg);
493 subd_req(cmd->ld->gossip, cmd->ld->gossip,
494 req, -1, 0, json_addgossip_reply, cmd);
495
496 return command_still_pending(cmd);
497}
498
499static const struct json_command addgossip_command = {
500 "addgossip",

Callers

nothing calls this directly

Calls 4

command_param_failedFunction · 0.70
subd_reqClass · 0.70
command_still_pendingFunction · 0.70
paramFunction · 0.50

Tested by

no test coverage detected