| 1158 | } |
| 1159 | |
| 1160 | void channel_fail_forget(struct channel *channel, const char *fmt, ...) |
| 1161 | { |
| 1162 | va_list ap; |
| 1163 | char *why; |
| 1164 | |
| 1165 | assert(channel->opener == REMOTE && |
| 1166 | channel->state == CHANNELD_AWAITING_LOCKIN); |
| 1167 | va_start(ap, fmt); |
| 1168 | why = tal_vfmt(tmpctx, fmt, ap); |
| 1169 | va_end(ap); |
| 1170 | |
| 1171 | log_unusual(channel->log, "Peer permanent failure in %s: %s, " |
| 1172 | "forget channel", |
| 1173 | channel_state_name(channel), why); |
| 1174 | |
| 1175 | if (!channel->error) |
| 1176 | channel->error = towire_errorfmt(channel, |
| 1177 | &channel->cid, "%s", why); |
| 1178 | |
| 1179 | delete_channel(channel, false); |
| 1180 | tal_free(why); |
| 1181 | } |
| 1182 | |
| 1183 | struct channel_inflight * |
| 1184 | channel_current_inflight(const struct channel *channel) |
no test coverage detected