Skip to content

Commit c573c15

Browse files
committed
chore: use EXPERIMENTAL for BOLT1 remote_addr #917
1 parent c340753 commit c573c15

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

connectd/peer_exchange_initmsg.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ static bool contains_common_chain(struct bitcoin_blkid *chains)
4141
/* Here in case we need to read another message. */
4242
static struct io_plan *read_init(struct io_conn *conn, struct early_peer *peer);
4343

44+
#if EXPERIMENTAL_FEATURES /* BOLT1 remote_addr #917 */
4445
struct remote_addr_any {
4546
u8 type; /* ipv4:1 ipv6:2 */
4647
}__attribute__((packed));
@@ -56,6 +57,7 @@ struct remote_addr_ipv6 {
5657
u8 addr[16];
5758
u16 port;
5859
}__attribute__((packed));
60+
#endif
5961

6062
static struct io_plan *peer_init_received(struct io_conn *conn,
6163
struct early_peer *peer)
@@ -105,6 +107,7 @@ static struct io_plan *peer_init_received(struct io_conn *conn,
105107

106108
/* fetch optional tlv `remote_addr` */
107109
remote_addr = NULL;
110+
#if EXPERIMENTAL_FEATURES /* BOLT1 remote_addr #917 */
108111
/* BOLT-remote-address #1:
109112
* The receiving node:
110113
* ...
@@ -124,6 +127,7 @@ static struct io_plan *peer_init_received(struct io_conn *conn,
124127
break;
125128
}
126129
}
130+
#endif
127131

128132
/* The globalfeatures field is now unused, but there was a
129133
* window where it was: combine the two. */
@@ -221,6 +225,7 @@ struct io_plan *peer_exchange_initmsg(struct io_conn *conn,
221225

222226
/* set optional tlv `remote_addr` on incoming IP connections */
223227
tlvs->remote_addr = NULL;
228+
#if EXPERIMENTAL_FEATURES /* BOLT1 remote_addr #917 */
224229
/* BOLT-remote-address #1:
225230
* The sending node:
226231
* ...
@@ -244,6 +249,7 @@ struct io_plan *peer_exchange_initmsg(struct io_conn *conn,
244249
break;
245250
}
246251
}
252+
#endif
247253

248254
/* Initially, there were two sets of feature bits: global and local.
249255
* Local affected peer nodes only, global affected everyone. Both were

0 commit comments

Comments
 (0)