From 6030d0542acbeacfaf3860e8786b28f04d3ae0d9 Mon Sep 17 00:00:00 2001 From: niftynei Date: Wed, 9 Dec 2020 13:07:10 -0600 Subject: [PATCH] bcli: print error message in debug log for broadcast failures --- plugins/bcli.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/bcli.c b/plugins/bcli.c index 43cb58679..b018ac5de 100644 --- a/plugins/bcli.c +++ b/plugins/bcli.c @@ -595,8 +595,12 @@ static struct command_result *process_sendrawtransaction(struct bitcoin_cli *bcl /* This is useful for functional tests. */ if (bcli->exitstatus) - plugin_log(bcli->cmd->plugin, LOG_DBG, "sendrawtx exit %i (%s)", - *bcli->exitstatus, bcli_args(bcli)); + plugin_log(bcli->cmd->plugin, LOG_DBG, + "sendrawtx exit %i (%s) %.*s", + *bcli->exitstatus, bcli_args(bcli), + *bcli->exitstatus ? + (u32)bcli->output_bytes-1 : 0, + bcli->output); response = jsonrpc_stream_success(bcli->cmd); json_add_bool(response, "success", *bcli->exitstatus == 0);