This repository has been archived by the owner on Jan 22, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing send-transaction-service using quic, tpu address is wrong (#31899
) * Fixing send-transaction-service using quic, tpu address is wrong * Use Protocol field instead of bool for passing protocol info * Address some code review comment from Behzad: get_leader_tpus per protocol
- Loading branch information
1 parent
038ca31
commit 4b0514d
Showing
3 changed files
with
65 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
use std::net::SocketAddr; | ||
use {solana_client::connection_cache::Protocol, std::net::SocketAddr}; | ||
|
||
pub trait TpuInfo { | ||
fn refresh_recent_peers(&mut self); | ||
fn get_leader_tpus(&self, max_count: u64) -> Vec<&SocketAddr>; | ||
fn get_leader_tpus(&self, max_count: u64, protocol: Protocol) -> Vec<&SocketAddr>; | ||
} | ||
|
||
#[derive(Clone)] | ||
pub struct NullTpuInfo; | ||
|
||
impl TpuInfo for NullTpuInfo { | ||
fn refresh_recent_peers(&mut self) {} | ||
fn get_leader_tpus(&self, _max_count: u64) -> Vec<&SocketAddr> { | ||
fn get_leader_tpus(&self, _max_count: u64, _protocol: Protocol) -> Vec<&SocketAddr> { | ||
vec![] | ||
} | ||
} |