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

Function opt_set_commando

cli/lightning-cli.c:614–630  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

612};
613
614static char *opt_set_commando(const char *arg, struct commando **commando)
615{
616 size_t idlen = strcspn(arg, ":");
617 *commando = tal(NULL, struct commando);
618
619 /* We don't use common/node_id.c here, to keep dependencies minimal */
620 if (idlen != PUBKEY_CMPR_LEN * 2)
621 return "Invalid peer id";
622 (*commando)->peer_id = tal_strndup(*commando, arg, idlen);
623
624 if (arg[idlen] == '\0')
625 (*commando)->rune = NULL;
626 else
627 (*commando)->rune = tal_strdup(*commando, arg + idlen + 1);
628
629 return NULL;
630}
631
632int main(int argc, char *argv[])
633{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected