plugin: wire JSON id for commands which caused hooks to fire.

Most obvious one is the "connect" hook.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2022-09-13 06:49:12 +09:30
parent eceb9f4328
commit e8ef42b741
15 changed files with 64 additions and 23 deletions

View File

@@ -940,7 +940,7 @@ parse_request(struct json_connection *jcon, const jsmntok_t tok[])
rpc_hook->custom_buffer = NULL;
db_begin_transaction(jcon->ld->wallet->db);
completed = plugin_hook_call_rpc_command(jcon->ld, rpc_hook);
completed = plugin_hook_call_rpc_command(jcon->ld, c->id, rpc_hook);
db_commit_transaction(jcon->ld->wallet->db);
/* If it's deferred, mark it (otherwise, it's completed) */