Skip to content

Commit

Permalink
df-mfc: remove guard-rails for failures
Browse files Browse the repository at this point in the history
This will cause blow ups for v2 multifundchannel attempts with failures,
but allows us to return the expected errors for single-shot
fundchannel attempts.

Error handling is coming, i promise
  • Loading branch information
niftynei committed Dec 22, 2020
1 parent 426131f commit 9254326
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions plugins/spender/openchannel.c
Original file line number Diff line number Diff line change
Expand Up @@ -416,14 +416,6 @@ openchannel_signed_err(struct command *cmd,
struct multifundchannel_command *mfc = dest->mfc;
const jsmntok_t *code_tok;

plugin_log(mfc->cmd->plugin, LOG_DBG,
"mfc %"PRIu64", dest %u: "
"failed! openchannel_signed %s: %.*s.",
mfc->id, dest->index,
node_id_to_hexstr(tmpctx, &dest->id),
json_tok_full_len(error),
json_tok_full(buf, error));

code_tok = json_get_member(buf, error, "code");
if (!code_tok)
plugin_err(cmd->plugin,
Expand Down Expand Up @@ -780,16 +772,8 @@ openchannel_update_err(struct command *cmd,
const jsmntok_t *error,
struct multifundchannel_destination *dest)
{
struct multifundchannel_command *mfc = dest->mfc;
const jsmntok_t *code_tok;

plugin_err(mfc->cmd->plugin,
"mfc %"PRIu64", dest %u: "
"failed! `openchannel_update` %s: %.*s",
mfc->id, dest->index,
node_id_to_hexstr(tmpctx, &dest->id),
json_tok_full_len(error), json_tok_full(buf, error));

code_tok = json_get_member(buf, error, "code");
if (!code_tok)
plugin_err(cmd->plugin,
Expand Down Expand Up @@ -1006,17 +990,8 @@ openchannel_init_err(struct command *cmd,
const jsmntok_t *error,
struct multifundchannel_destination *dest)
{
struct multifundchannel_command *mfc = dest->mfc;
const jsmntok_t *code_tok;

plugin_err(mfc->cmd->plugin,
"mfc %"PRIu64", dest %u: "
"failed! openchannel_init %s: %.*s.",
mfc->id, dest->index,
node_id_to_hexstr(tmpctx, &dest->id),
json_tok_full_len(error),
json_tok_full(buf, error));

code_tok = json_get_member(buf, error, "code");
if (!code_tok)
plugin_err(cmd->plugin,
Expand Down

0 comments on commit 9254326

Please sign in to comment.