Browse Source

connectd: return error when no common chain at init

This is useful for testing.
travis-debug
darosior 5 years ago
committed by Christian Decker
parent
commit
77eb9e45b2
  1. 4
      connectd/peer_exchange_initmsg.c

4
connectd/peer_exchange_initmsg.c

@ -79,7 +79,9 @@ static struct io_plan *peer_init_received(struct io_conn *conn,
status_peer_debug(&peer->id,
"No common chain with this peer '%s', closing",
tal_hex(tmpctx, msg));
return io_close(conn);
msg = towire_errorfmt(NULL, NULL, "No common network");
msg = cryptomsg_encrypt_msg(NULL, &peer->cs, take(msg));
return io_write(conn, msg, tal_count(msg), io_close_cb, NULL);
}
}

Loading…
Cancel
Save