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

Function sendpay

common/test/run-param.c:468–489  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

466}
467
468static void sendpay(void)
469{
470 struct json *j = json_parse(cmd, "[ 'A', '123', 'hello there' '547']");
471
472 const jsmntok_t *routetok, *note;
473 u64 *msatoshi;
474 unsigned *cltv;
475
476 if (!param(cmd, j->buffer, j->toks,
477 p_req("route", param_tok, &routetok),
478 p_req("cltv", param_number, &cltv),
479 p_opt("note", param_tok, &note),
480 p_opt("msatoshi", param_u64, &msatoshi),
481 NULL))
482 assert(false);
483
484 assert(note);
485 assert(!strncmp("hello there", j->buffer + note->start,
486 note->end - note->start));
487 assert(msatoshi);
488 assert(*msatoshi == 547);
489}
490
491static void invalid_bech32m(void)
492{

Callers 1

mainFunction · 0.85

Calls 2

json_parseFunction · 0.70
paramClass · 0.70

Tested by

no test coverage detected