| 828 | } |
| 829 | |
| 830 | void channel_fail_forget(struct channel *channel, const char *fmt, ...) |
| 831 | { |
| 832 | va_list ap; |
| 833 | char *why; |
| 834 | |
| 835 | assert(channel->opener == REMOTE && |
| 836 | channel->state == CHANNELD_AWAITING_LOCKIN); |
| 837 | va_start(ap, fmt); |
| 838 | why = tal_vfmt(tmpctx, fmt, ap); |
| 839 | va_end(ap); |
| 840 | |
| 841 | log_unusual(channel->log, "Peer permanent failure in %s: %s, " |
| 842 | "forget channel", |
| 843 | channel_state_name(channel), why); |
| 844 | |
| 845 | if (!channel->error) |
| 846 | channel->error = towire_errorfmt(channel, |
| 847 | &channel->cid, "%s", why); |
| 848 | |
| 849 | delete_channel(channel); |
| 850 | tal_free(why); |
| 851 | } |
| 852 | |
| 853 | struct channel_inflight * |
| 854 | channel_current_inflight(const struct channel *channel) |
no test coverage detected