|
10 | 10 | find_available_ports_in_range,
|
11 | 11 | sockets::{
|
12 | 12 | bind_gossip_port_in_range, bind_in_range_with_config, bind_more_with_config,
|
13 |
| - bind_to_with_config, bind_two_in_range_with_offset_and_config, |
14 |
| - localhost_port_range_for_tests, multi_bind_in_range_with_config, |
15 |
| - SocketConfiguration as SocketConfig, |
| 13 | + bind_two_in_range_with_offset_and_config, localhost_port_range_for_tests, |
| 14 | + multi_bind_in_range_with_config, SocketConfiguration as SocketConfig, |
16 | 15 | },
|
17 | 16 | PortRange,
|
18 | 17 | },
|
@@ -202,13 +201,17 @@ impl Node {
|
202 | 201 | let (alpenglow_port, alpenglow) =
|
203 | 202 | bind_in_range_with_config(bind_ip_addr, port_range, socket_config)
|
204 | 203 | .expect("Alpenglow port bind should succeed");
|
205 |
| - // These are client sockets, so the port is set to be 0 because it must be ephimeral. |
206 |
| - let tpu_vote_forwarding_client = |
207 |
| - bind_to_with_config(bind_ip_addr, 0, socket_config).unwrap(); |
208 |
| - let tpu_transaction_forwarding_client = |
209 |
| - bind_to_with_config(bind_ip_addr, 0, socket_config).unwrap(); |
210 |
| - let quic_vote_client = bind_to_with_config(bind_ip_addr, 0, socket_config).unwrap(); |
211 |
| - let rpc_sts_client = bind_to_with_config(bind_ip_addr, 0, socket_config).unwrap(); |
| 204 | + // These are "client" sockets, so they could use ephemeral ports, but we |
| 205 | + // force them into the provided port_range to simplify the operations. |
| 206 | + let (_, tpu_vote_forwarding_client) = |
| 207 | + bind_in_range_with_config(bind_ip_addr, port_range, socket_config).unwrap(); |
| 208 | + let (_, tpu_transaction_forwarding_client) = |
| 209 | + bind_in_range_with_config(bind_ip_addr, port_range, socket_config).unwrap(); |
| 210 | + let (_, quic_vote_client) = |
| 211 | + bind_in_range_with_config(bind_ip_addr, port_range, socket_config).unwrap(); |
| 212 | + |
| 213 | + let (_, rpc_sts_client) = |
| 214 | + bind_in_range_with_config(bind_ip_addr, port_range, socket_config).unwrap(); |
212 | 215 |
|
213 | 216 | let mut info = ContactInfo::new(
|
214 | 217 | *pubkey,
|
|
0 commit comments