Skip to content

Commit

Permalink
bcli: don't log failed sendrawtransaction attempts twice
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
darosior authored and niftynei committed May 1, 2020
1 parent 678591d commit 3fc7773
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions plugins/bcli.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3fc7773

Please sign in to comment.