mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-01 17:47:30 +01:00
connectd: return error when no common chain at init
This is useful for testing.
This commit is contained in:
parent
1e15e13de0
commit
77eb9e45b2
1 changed files with 3 additions and 1 deletions
|
@ -79,7 +79,9 @@ static struct io_plan *peer_init_received(struct io_conn *conn,
|
||||||
status_peer_debug(&peer->id,
|
status_peer_debug(&peer->id,
|
||||||
"No common chain with this peer '%s', closing",
|
"No common chain with this peer '%s', closing",
|
||||||
tal_hex(tmpctx, msg));
|
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…
Add table
Reference in a new issue