@@ -2108,6 +2108,11 @@ static struct io_plan *init_pkt_in(struct io_conn *conn, struct peer *peer)
2108
2108
if (peer -> inpkt -> init -> has_features ) {
2109
2109
size_t i ;
2110
2110
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. */
2111
2116
for (i = 0 ; i < peer -> inpkt -> init -> features .len * CHAR_BIT ; i ++ ) {
2112
2117
size_t byte = i / CHAR_BIT , bit = i % CHAR_BIT ;
2113
2118
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)
2176
2181
2177
2182
/* BOLT #2:
2178
2183
*
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`. */
2189
2190
return peer_write_packet (conn , peer ,
2190
2191
pkt_init (peer , sigs + revokes
2191
2192
+ shutdown + closing ),
0 commit comments