Struct solana_gossip::crds_gossip_pull::CrdsGossipPull [−][src]
pub struct CrdsGossipPull { pub failed_inserts: VecDeque<(Hash, u64)>, pub crds_timeout: u64, pub msg_timeout: u64, pub num_pulls: usize, // some fields omitted }
Fields
failed_inserts: VecDeque<(Hash, u64)>
crds_timeout: u64
msg_timeout: u64
num_pulls: usize
Implementations
pub fn new_pull_request(
&self,
thread_pool: &ThreadPool,
crds: &Crds,
self_keypair: &Keypair,
self_shred_version: u16,
now: u64,
gossip_validators: Option<&HashSet<Pubkey>>,
stakes: &HashMap<Pubkey, u64>,
bloom_size: usize,
ping_cache: &Mutex<PingCache>,
pings: &mut Vec<(SocketAddr, Ping<[u8; 32]>)>
) -> Result<(ContactInfo, Vec<CrdsFilter>), CrdsGossipError>
[src]
pub fn new_pull_request(
&self,
thread_pool: &ThreadPool,
crds: &Crds,
self_keypair: &Keypair,
self_shred_version: u16,
now: u64,
gossip_validators: Option<&HashSet<Pubkey>>,
stakes: &HashMap<Pubkey, u64>,
bloom_size: usize,
ping_cache: &Mutex<PingCache>,
pings: &mut Vec<(SocketAddr, Ping<[u8; 32]>)>
) -> Result<(ContactInfo, Vec<CrdsFilter>), CrdsGossipError>
[src]generate a random request
time when a request to from
was initiated
This is used for weighted random selection during new_pull_request
It’s important to use the local nodes request creation time as the weight
instead of the response received time otherwise failed nodes will increase their weight.
pub fn process_pull_requests<I>(
&mut self,
crds: &mut Crds,
callers: I,
now: u64
) where
I: IntoIterator<Item = CrdsValue>,
[src]
pub fn process_pull_requests<I>(
&mut self,
crds: &mut Crds,
callers: I,
now: u64
) where
I: IntoIterator<Item = CrdsValue>,
[src]process a pull request
Create gossip responses to pull requests
pub fn filter_pull_responses(
&self,
crds: &Crds,
timeouts: &HashMap<Pubkey, u64>,
responses: Vec<CrdsValue>,
now: u64,
stats: &mut ProcessPullStats
) -> (Vec<CrdsValue>, Vec<CrdsValue>, Vec<Hash>)
[src]pub fn process_pull_responses(
&mut self,
crds: &mut Crds,
from: &Pubkey,
responses: Vec<CrdsValue>,
responses_expired_timeout: Vec<CrdsValue>,
failed_inserts: Vec<Hash>,
now: u64,
stats: &mut ProcessPullStats
)
[src]
pub fn process_pull_responses(
&mut self,
crds: &mut Crds,
from: &Pubkey,
responses: Vec<CrdsValue>,
responses_expired_timeout: Vec<CrdsValue>,
failed_inserts: Vec<Hash>,
now: u64,
stats: &mut ProcessPullStats
)
[src]process a vec of pull responses
pub fn build_crds_filters(
&self,
thread_pool: &ThreadPool,
crds: &Crds,
bloom_size: usize
) -> Vec<CrdsFilter>
[src]pub fn purge_active(
&mut self,
thread_pool: &ThreadPool,
crds: &mut Crds,
now: u64,
timeouts: &HashMap<Pubkey, u64>
) -> usize
[src]
pub fn purge_active(
&mut self,
thread_pool: &ThreadPool,
crds: &mut Crds,
now: u64,
timeouts: &HashMap<Pubkey, u64>
) -> usize
[src]Purge values from the crds that are older then active_timeout
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for CrdsGossipPull
impl Send for CrdsGossipPull
impl Sync for CrdsGossipPull
impl Unpin for CrdsGossipPull
impl UnwindSafe for CrdsGossipPull
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Wrap the input message T
in a tonic::Request
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more