| 1199 | } |
| 1200 | |
| 1201 | void channel_fail_forget(struct channel *channel, const char *fmt, ...) |
| 1202 | { |
| 1203 | va_list ap; |
| 1204 | char *why; |
| 1205 | |
| 1206 | assert(channel->opener == REMOTE && |
| 1207 | channel->state == CHANNELD_AWAITING_LOCKIN); |
| 1208 | va_start(ap, fmt); |
| 1209 | why = tal_vfmt(tmpctx, fmt, ap); |
| 1210 | va_end(ap); |
| 1211 | |
| 1212 | log_unusual(channel->log, "Peer permanent failure in %s: %s, " |
| 1213 | "forget channel", |
| 1214 | channel_state_name(channel), why); |
| 1215 | |
| 1216 | if (!channel->error) |
| 1217 | channel->error = towire_errorfmt(channel, |
| 1218 | &channel->cid, "%s", why); |
| 1219 | |
| 1220 | delete_channel(channel, false); |
| 1221 | tal_free(why); |
| 1222 | } |
| 1223 | |
| 1224 | struct channel_inflight * |
| 1225 | channel_current_inflight(const struct channel *channel) |
no test coverage detected