mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
lightningd: only use non-numeric JSON ids if plugin says we can.
We also remember whether the id is a string or not, for replacement in JSON passthrough. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
24651f57ad
commit
d5ce5cbab3
@@ -235,6 +235,7 @@ static void plugin_hook_call_next(struct plugin_hook_request *ph_req)
|
||||
log_debug(ph_req->ld->log, "Calling %s hook of plugin %s",
|
||||
ph_req->hook->name, ph_req->plugin->shortname);
|
||||
req = jsonrpc_request_start(NULL, hook->name, ph_req->cmd_id,
|
||||
ph_req->plugin->non_numeric_ids,
|
||||
plugin_get_log(ph_req->plugin),
|
||||
NULL,
|
||||
plugin_hook_callback, ph_req);
|
||||
@@ -380,7 +381,9 @@ void plugin_hook_db_sync(struct db *db)
|
||||
|
||||
/* FIXME: id_prefix from caller? */
|
||||
/* FIXME: do IO logging for this! */
|
||||
req = jsonrpc_request_start(NULL, hook->name, NULL, NULL, NULL,
|
||||
req = jsonrpc_request_start(NULL, hook->name, NULL,
|
||||
dwh_req->plugin->non_numeric_ids,
|
||||
NULL, NULL,
|
||||
db_hook_response,
|
||||
dwh_req);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user