2021-08-23 15:32:15 -07:00
|
|
|
use std::net::SocketAddr;
|
|
|
|
|
|
|
|
pub trait TpuInfo {
|
|
|
|
fn refresh_recent_peers(&mut self);
|
|
|
|
fn get_leader_tpus(&self, max_count: u64) -> Vec<&SocketAddr>;
|
|
|
|
}
|
|
|
|
|
2022-04-21 12:43:08 -07:00
|
|
|
#[derive(Clone)]
|
2021-08-23 15:32:15 -07:00
|
|
|
pub struct NullTpuInfo;
|
|
|
|
|
|
|
|
impl TpuInfo for NullTpuInfo {
|
|
|
|
fn refresh_recent_peers(&mut self) {}
|
|
|
|
fn get_leader_tpus(&self, _max_count: u64) -> Vec<&SocketAddr> {
|
|
|
|
vec![]
|
|
|
|
}
|
|
|
|
}
|