1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
use std::net::SocketAddr;
pub trait TpuInfo {
fn refresh_recent_peers(&mut self);
fn get_leader_tpus(&self, max_count: u64) -> 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> {
vec![]
}
}