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:
Rusty Russell
2021-02-03 13:21:41 +10:30
parent f4ee41a989
commit 6b11cc8b8c
25 changed files with 220 additions and 216 deletions

View File

@@ -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);
}