Skip to content

Commit f5c8934

Browse files
Lagrang3endothermicdev
authored andcommitted
xpay: reduce log entries on rpc_command hook
Don't print unnecessary log entries every time we receive an rpc_command hook event. Only log when `pay` is called. Changelog-None Signed-off-by: Lagrang3 <[email protected]>
1 parent 3649a54 commit f5c8934

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

plugins/xpay/xpay.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1930,12 +1930,13 @@ static struct command_result *handle_rpc_command(struct command *cmd,
19301930
method_tok = json_get_member(buf, rpc_tok, "method");
19311931
params_tok = json_get_member(buf, rpc_tok, "params");
19321932
id_tok = json_get_member(buf, rpc_tok, "id");
1933-
plugin_log(cmd->plugin, LOG_DBG, "Got command %s",
1934-
json_strdup(tmpctx, buf, method_tok));
19351933

19361934
if (!json_tok_streq(buf, method_tok, "pay"))
19371935
goto dont_redirect;
19381936

1937+
plugin_log(cmd->plugin, LOG_DBG, "Got command %s",
1938+
json_strdup(tmpctx, buf, method_tok));
1939+
19391940
/* Array params? Only handle up to two args (bolt11, msat) */
19401941
if (params_tok->type == JSMN_ARRAY) {
19411942
if (params_tok->size != 1 && params_tok->size != 2) {

0 commit comments

Comments
 (0)