xpay: use filtering on rpc_command so we only get called on "pay".
tests/test_coinmoves.py::test_generate_coinmoves (2,000,000, sqlite3): Time (from start to end of l2 node): 135 seconds **WAS 227** Worst latency: 12.1 seconds **WAS 62.4** Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -2500,10 +2500,13 @@ dont_redirect:
|
||||
return command_hook_success(cmd);
|
||||
}
|
||||
|
||||
static const char *cmd_hook_filters[] = {"pay"};
|
||||
static const struct plugin_hook hooks[] = {
|
||||
{
|
||||
"rpc_command",
|
||||
handle_rpc_command,
|
||||
.name = "rpc_command",
|
||||
.handle = handle_rpc_command,
|
||||
.strfilters = cmd_hook_filters,
|
||||
.num_strfilters = ARRAY_SIZE(cmd_hook_filters),
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user