mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
common: disallow NULL channel_id to peer_failed_err.
No more sending "all-channel" errors; in particular, gossipd now only sends warnings (which make us hang up), not errors, and peer_connected rejections are warnings (and disconnect), not errors. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Changed: Plugins: `peer_connected` rejections now send a warning, not an error, to the peer.
This commit is contained in:
@@ -79,7 +79,7 @@ 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));
|
||||
msg = towire_errorfmt(NULL, NULL, "No common network");
|
||||
msg = towire_warningfmt(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