@@ -2108,6 +2108,11 @@ static struct io_plan *init_pkt_in(struct io_conn *conn, struct peer *peer)
21082108 if (peer -> inpkt -> init -> has_features ) {
21092109 size_t i ;
21102110
2111+ /* BOLT #2:
2112+ *
2113+ * The receiving node SHOULD ignore any odd feature bits it
2114+ * does not support, and MUST fail the connection if any
2115+ * unsupported even `features` bit is set. */
21112116 for (i = 0 ; i < peer -> inpkt -> init -> features .len * CHAR_BIT ; i ++ ) {
21122117 size_t byte = i / CHAR_BIT , bit = i % CHAR_BIT ;
21132118 if (peer -> inpkt -> init -> features .data [byte ] & (1 <<bit )) {
@@ -2176,16 +2181,12 @@ static struct io_plan *peer_send_init(struct io_conn *conn, struct peer *peer)
21762181
21772182 /* BOLT #2:
21782183 *
2179- * A node reconnecting after receiving or sending an `open_channel`
2180- * message SHOULD send a `reconnect` message on the new connection
2181- * immediately after it has validated the `authenticate` message. */
2182-
2183- /* BOLT #2:
2184- *
2185- * A node MUST set the `ack` field in the `reconnect` message to the
2186- * the sum of previously-processed messages of types
2187- * `open_commit_sig`, `update_commit`, `update_revocation`,
2188- * `close_shutdown` and `close_signature`. */
2184+ * A node MUST send an `init` message immediately immediately after
2185+ * it has validated the `authenticate` message. A node MUST set
2186+ * the `ack` field in the `init` message to the the sum of
2187+ * previously-processed messages of types `open_commit_sig`,
2188+ * `update_commit`, `update_revocation`, `close_shutdown` and
2189+ * `close_signature`. */
21892190 return peer_write_packet (conn , peer ,
21902191 pkt_init (peer , sigs + revokes
21912192 + shutdown + closing ),
0 commit comments