mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
connectd: return error when no common chain at init
This is useful for testing.
This commit is contained in:
committed by
Christian Decker
parent
1e15e13de0
commit
77eb9e45b2
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user