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

Function sendpay

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

Source from the content-addressed store, hash-verified

418}
419
420static void sendpay(void)
421{
422 struct json *j = json_parse(cmd, "[ 'A', '123', 'hello there' '547']");
423
424 const jsmntok_t *routetok, *note;
425 u64 *msatoshi;
426 unsigned *cltv;
427
428 if (!param(cmd, j->buffer, j->toks,
429 p_req("route", param_tok, &routetok),
430 p_req("cltv", param_number, &cltv),
431 p_opt("note", param_tok, &note),
432 p_opt("msatoshi", param_u64, &msatoshi),
433 NULL))
434 assert(false);
435
436 assert(note);
437 assert(!strncmp("hello there", j->buffer + note->start,
438 note->end - note->start));
439 assert(msatoshi);
440 assert(*msatoshi == 547);
441}
442
443static void deprecated_rename(void)
444{

Callers 1

mainFunction · 0.85

Calls 2

json_parseFunction · 0.70
paramClass · 0.70

Tested by

no test coverage detected