lightningd: derive JSONRPC ids from incoming id (append /cln:<method>#NNN).

Usually the calls are spontanous, so it's just "cln:<method>#NNN", but
json_invoice() calls listincoming, and json_checkmessage calls
listnodes, so those become "cli:invoice-<pid>/cln:listincoming#NNN".

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2022-09-13 06:49:11 +09:30
parent 8fcf880e0f
commit a9557d5194
9 changed files with 40 additions and 20 deletions

View File

@@ -491,7 +491,8 @@ void jsonrpc_request_end(struct jsonrpc_request *request UNNEEDED)
{ fprintf(stderr, "jsonrpc_request_end called!\n"); abort(); }
/* Generated stub for jsonrpc_request_start_ */
struct jsonrpc_request *jsonrpc_request_start_(
const tal_t *ctx UNNEEDED, const char *method UNNEEDED, struct log *log UNNEEDED, bool add_header UNNEEDED,
const tal_t *ctx UNNEEDED, const char *method UNNEEDED,
const char *id_prefix UNNEEDED, struct log *log UNNEEDED, bool add_header UNNEEDED,
void (*notify_cb)(const char *buffer UNNEEDED,
const jsmntok_t *idtok UNNEEDED,
const jsmntok_t *methodtok UNNEEDED,