mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 14:42:40 +01:00
lightningd: remove duplicate routine fail_transient_delayreconnect
Code is identical to `channel_fail_transient`
This commit is contained in:
parent
b375a35fa0
commit
96b3b40765
4 changed files with 3 additions and 19 deletions
|
@ -973,15 +973,6 @@ static void channel_err(struct channel *channel, const char *why)
|
||||||
channel_set_owner(channel, NULL);
|
channel_set_owner(channel, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void channel_fail_transient_delayreconnect(struct channel *channel, const char *fmt, ...)
|
|
||||||
{
|
|
||||||
va_list ap;
|
|
||||||
|
|
||||||
va_start(ap, fmt);
|
|
||||||
channel_err(channel, tal_vfmt(tmpctx, fmt, ap));
|
|
||||||
va_end(ap);
|
|
||||||
}
|
|
||||||
|
|
||||||
void channel_fail_transient(struct channel *channel, const char *fmt, ...)
|
void channel_fail_transient(struct channel *channel, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
|
@ -378,9 +378,6 @@ void channel_set_owner(struct channel *channel, struct subd *owner);
|
||||||
/* Channel has failed, but can try again. */
|
/* Channel has failed, but can try again. */
|
||||||
void channel_fail_transient(struct channel *channel,
|
void channel_fail_transient(struct channel *channel,
|
||||||
const char *fmt, ...) PRINTF_FMT(2,3);
|
const char *fmt, ...) PRINTF_FMT(2,3);
|
||||||
/* Channel has failed, but can try again after a minute. */
|
|
||||||
void channel_fail_transient_delayreconnect(struct channel *channel,
|
|
||||||
const char *fmt,...) PRINTF_FMT(2,3);
|
|
||||||
|
|
||||||
/* Channel has failed, give up on it. */
|
/* Channel has failed, give up on it. */
|
||||||
void channel_fail_permanent(struct channel *channel,
|
void channel_fail_permanent(struct channel *channel,
|
||||||
|
|
|
@ -381,8 +381,8 @@ void channel_errmsg(struct channel *channel,
|
||||||
* and we would close the channel on them. We now support warnings
|
* and we would close the channel on them. We now support warnings
|
||||||
* for this case. */
|
* for this case. */
|
||||||
if (warning) {
|
if (warning) {
|
||||||
channel_fail_transient_delayreconnect(channel, "%s WARNING: %s",
|
channel_fail_transient(channel, "%s WARNING: %s",
|
||||||
channel->owner->name, desc);
|
channel->owner->name, desc);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1836,7 +1836,7 @@ static enum watch_result funding_depth_cb(struct lightningd *ld,
|
||||||
warning)));
|
warning)));
|
||||||
/* When we restart channeld, it will be initialized with updated scid
|
/* When we restart channeld, it will be initialized with updated scid
|
||||||
* and also adds it (at least our halve_chan) to rtable. */
|
* and also adds it (at least our halve_chan) to rtable. */
|
||||||
channel_fail_transient_delayreconnect(channel,
|
channel_fail_transient(channel,
|
||||||
"short_channel_id changed to %s (was %s)",
|
"short_channel_id changed to %s (was %s)",
|
||||||
short_channel_id_to_str(tmpctx, &scid),
|
short_channel_id_to_str(tmpctx, &scid),
|
||||||
short_channel_id_to_str(tmpctx, channel->scid));
|
short_channel_id_to_str(tmpctx, channel->scid));
|
||||||
|
|
|
@ -74,10 +74,6 @@ void channel_fail_permanent(struct channel *channel UNNEEDED,
|
||||||
void channel_fail_transient(struct channel *channel UNNEEDED,
|
void channel_fail_transient(struct channel *channel UNNEEDED,
|
||||||
const char *fmt UNNEEDED, ...)
|
const char *fmt UNNEEDED, ...)
|
||||||
{ fprintf(stderr, "channel_fail_transient called!\n"); abort(); }
|
{ fprintf(stderr, "channel_fail_transient called!\n"); abort(); }
|
||||||
/* Generated stub for channel_fail_transient_delayreconnect */
|
|
||||||
void channel_fail_transient_delayreconnect(struct channel *channel UNNEEDED,
|
|
||||||
const char *fmt UNNEEDED,...)
|
|
||||||
{ fprintf(stderr, "channel_fail_transient_delayreconnect called!\n"); abort(); }
|
|
||||||
/* Generated stub for channel_has_htlc_in */
|
/* Generated stub for channel_has_htlc_in */
|
||||||
struct htlc_in *channel_has_htlc_in(struct channel *channel UNNEEDED)
|
struct htlc_in *channel_has_htlc_in(struct channel *channel UNNEEDED)
|
||||||
{ fprintf(stderr, "channel_has_htlc_in called!\n"); abort(); }
|
{ fprintf(stderr, "channel_has_htlc_in called!\n"); abort(); }
|
||||||
|
|
Loading…
Add table
Reference in a new issue