lightningd: fail for the moment if we fail in CHANNELD_NORMAL.

This makes testing easier for the moment, until we implement this.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2017-06-20 15:18:03 +09:30
parent b07b1c1690
commit ad60d71c55

View File

@ -110,6 +110,11 @@ void peer_fail(struct peer *peer, const char *fmt, ...)
goto dont_talk;
}
/* FIXME: Implement reconnect here! */
if (peer->state == CHANNELD_NORMAL) {
fatal("Peer fail in CHANNELD_NORMAL");
}
/* Reconnect unless we've dropped to chain. */
if (!peer_on_chain(peer)) {
peer_reconnect(peer);