From e9533d322ac1d3c977b570fc44e543f5a6d267b0 Mon Sep 17 00:00:00 2001 From: Antoine Poinsot Date: Tue, 28 Apr 2020 11:19:53 +0200 Subject: [PATCH] bcli: don't log failed sendrawtransaction attempts twice They are already logged both in bcli, and in lightningd. This just adds a lot of noise to the logs. We keep successed attempts though for the tests. Signed-off-by: Antoine Poinsot --- plugins/bcli.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/bcli.c b/plugins/bcli.c index 215408ebe313..6412cd105d72 100644 --- a/plugins/bcli.c +++ b/plugins/bcli.c @@ -625,8 +625,10 @@ static struct command_result *process_sendrawtransaction(struct bitcoin_cli *bcl { struct json_stream *response; - plugin_log(bcli->cmd->plugin, LOG_DBG, "sendrawtx exit %i (%s)", - *bcli->exitstatus, bcli_args(bcli)); + /* This is useful for functional tests. */ + if (*bcli->exitstatus == 0) + plugin_log(bcli->cmd->plugin, LOG_DBG, "sendrawtx exit %i (%s)", + *bcli->exitstatus, bcli_args(bcli)); response = jsonrpc_stream_success(bcli->cmd); json_add_bool(response, "success", *bcli->exitstatus == 0);