Skip to content

Commit

Permalink
fixup! lightningd: Add tx_abort routine to lightningd
Browse files Browse the repository at this point in the history
  • Loading branch information
ddustin committed Feb 10, 2024
1 parent 4a12580 commit d97e3aa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion common/wire_error.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ char *sanitize_error(const tal_t *ctx, const u8 *errmsg,
struct channel_id dummy;
u8 *data;
size_t i;
char *tag;
const char *tag;

if (!channel_id)
channel_id = &dummy;
Expand Down
16 changes: 10 additions & 6 deletions lightningd/channel_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ static void handle_splice_abort(struct lightningd *ld,
&inflight->funding->outpoint));

wallet_inflight_del(ld->wallet, channel, inflight);
tal_free(inflight);
}

cc = splice_command_for_chan(ld, channel);
Expand All @@ -348,10 +349,14 @@ static void handle_splice_abort(struct lightningd *ld,
tal_hex(tmpctx, error));
/* Get connectd to send error and close. */
subd_send_msg(ld->connectd,
take(towire_connectd_peer_final_msg(NULL,
&peer->id,
peer->connectd_counter,
error)));
take(towire_connectd_peer_send_msg(NULL,
&peer->id,
peer->connectd_counter,
error)));
subd_send_msg(ld->connectd,
take(towire_connectd_discard_peer(NULL,
&peer->id,
peer->connectd_counter)));
return;
}
log_debug(channel->log, "made the socket pair");
Expand All @@ -366,8 +371,7 @@ static void handle_splice_abort(struct lightningd *ld,
&channel->cid)));
subd_send_fd(ld->connectd, fds[1]);
log_info(channel->log, "Sent the peer fd to channeld");
}
else {
} else {
log_info(channel->log, "peer_start_channeld failed");
close(fds[1]);
}
Expand Down

0 comments on commit d97e3aa

Please sign in to comment.