Skip to content

Commit

Permalink
rpc: add tpu_forwards/tpu_forwards_quic to getClusterNodes
Browse files Browse the repository at this point in the history
  • Loading branch information
fanatid committed Jun 6, 2024
1 parent 329a186 commit 0475974
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rpc-client-api/src/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,12 @@ pub struct RpcContactInfo {
pub gossip: Option<SocketAddr>,
/// Tpu UDP port
pub tpu: Option<SocketAddr>,
/// Tpu UDP forwards port
pub tpu_forwards: Option<SocketAddr>,
/// Tpu QUIC port
pub tpu_quic: Option<SocketAddr>,
/// Tpu QUIC forwards port
pub tpu_forwards_quic: Option<SocketAddr>,
/// JSON RPC port
pub rpc: Option<SocketAddr>,
/// WebSocket PubSub port
Expand Down
2 changes: 2 additions & 0 deletions rpc-client/src/mock_sender.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,9 @@ impl RpcSender for MockSender {
pubkey: PUBKEY.to_string(),
gossip: Some(SocketAddr::from(([10, 239, 6, 48], 8899))),
tpu: Some(SocketAddr::from(([10, 239, 6, 48], 8856))),
tpu_forwards: Some(SocketAddr::from(([10, 239, 6, 48], 8857))),
tpu_quic: Some(SocketAddr::from(([10, 239, 6, 48], 8862))),
tpu_forwards_quic: Some(SocketAddr::from(([10, 239, 6, 48], 8863))),
rpc: Some(SocketAddr::from(([10, 239, 6, 48], 8899))),
pubsub: Some(SocketAddr::from(([10, 239, 6, 48], 8900))),
version: Some("1.0.0 c375ce1f".to_string()),
Expand Down
8 changes: 8 additions & 0 deletions rpc/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3556,10 +3556,18 @@ pub mod rpc_full {
.tpu(Protocol::UDP)
.ok()
.filter(|addr| socket_addr_space.check(addr)),
tpu_forwards: contact_info
.tpu_forwards(Protocol::UDP)
.ok()
.filter(|addr| socket_addr_space.check(addr)),
tpu_quic: contact_info
.tpu(Protocol::QUIC)
.ok()
.filter(|addr| socket_addr_space.check(addr)),
tpu_forwards_quic: contact_info
.tpu_forwards(Protocol::QUIC)
.ok()
.filter(|addr| socket_addr_space.check(addr)),
rpc: contact_info
.rpc()
.ok()
Expand Down

0 comments on commit 0475974

Please sign in to comment.