pub struct LegacyContactInfo {Show 13 fields
pub id: Pubkey,
pub gossip: SocketAddr,
pub tvu: SocketAddr,
pub tvu_forwards: SocketAddr,
pub repair: SocketAddr,
pub tpu: SocketAddr,
pub tpu_forwards: SocketAddr,
pub tpu_vote: SocketAddr,
pub rpc: SocketAddr,
pub rpc_pubsub: SocketAddr,
pub serve_repair: SocketAddr,
pub wallclock: u64,
pub shred_version: u16,
}
Expand description
Structure representing a node on the network
Fields§
§id: Pubkey
§gossip: SocketAddr
gossip address
tvu: SocketAddr
address to connect to for replication
tvu_forwards: SocketAddr
address to forward shreds to
repair: SocketAddr
address to send repair responses to
tpu: SocketAddr
transactions address
tpu_forwards: SocketAddr
address to forward unprocessed transactions to
tpu_vote: SocketAddr
address to which to send bank state requests
rpc: SocketAddr
address to which to send JSON-RPC requests
rpc_pubsub: SocketAddr
websocket for JSON-RPC push notifications
serve_repair: SocketAddr
address to send repair requests to
wallclock: u64
latest wallclock picked
shred_version: u16
node shred version
Implementations§
source§impl LegacyContactInfo
impl LegacyContactInfo
pub fn new_localhost(id: &Pubkey, now: u64) -> Self
sourcepub fn new_rand<R: Rng>(rng: &mut R, pubkey: Option<Pubkey>) -> Self
pub fn new_rand<R: Rng>(rng: &mut R, pubkey: Option<Pubkey>) -> Self
New random LegacyContactInfo for tests and simulations.
pub fn new_with_pubkey_socketaddr(
pubkey: &Pubkey,
bind_addr: &SocketAddr
) -> Self
pub fn new_with_socketaddr(bind_addr: &SocketAddr) -> Self
pub fn new_gossip_entry_point(gossip_addr: &SocketAddr) -> Self
sourcepub fn is_valid_address(
addr: &SocketAddr,
socket_addr_space: &SocketAddrSpace
) -> bool
pub fn is_valid_address(
addr: &SocketAddr,
socket_addr_space: &SocketAddrSpace
) -> bool
port must not be 0 ip must be specified and not multicast loopback ip is only allowed in tests
pub fn client_facing_addr(&self) -> (SocketAddr, SocketAddr)
pub fn valid_client_facing_addr(
&self,
socket_addr_space: &SocketAddrSpace
) -> Option<(SocketAddr, SocketAddr)>
Trait Implementations§
source§impl AbiExample for LegacyContactInfo
impl AbiExample for LegacyContactInfo
source§impl Clone for LegacyContactInfo
impl Clone for LegacyContactInfo
source§fn clone(&self) -> LegacyContactInfo
fn clone(&self) -> LegacyContactInfo
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'a, 'b> CrdsEntry<'a, 'b> for &'a LegacyContactInfo
impl<'a, 'b> CrdsEntry<'a, 'b> for &'a LegacyContactInfo
type Key = Pubkey
fn get_entry(
table: &'a IndexMap<CrdsValueLabel, VersionedCrdsValue>,
key: Self::Key
) -> Option<Self>
source§impl Debug for LegacyContactInfo
impl Debug for LegacyContactInfo
source§impl Default for LegacyContactInfo
impl Default for LegacyContactInfo
source§impl<'de> Deserialize<'de> for LegacyContactInfo
impl<'de> Deserialize<'de> for LegacyContactInfo
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for LegacyContactInfo
impl Hash for LegacyContactInfo
source§impl Ord for LegacyContactInfo
impl Ord for LegacyContactInfo
source§fn cmp(&self, other: &LegacyContactInfo) -> Ordering
fn cmp(&self, other: &LegacyContactInfo) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<LegacyContactInfo> for LegacyContactInfo
impl PartialEq<LegacyContactInfo> for LegacyContactInfo
source§fn eq(&self, other: &LegacyContactInfo) -> bool
fn eq(&self, other: &LegacyContactInfo) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<LegacyContactInfo> for LegacyContactInfo
impl PartialOrd<LegacyContactInfo> for LegacyContactInfo
source§fn partial_cmp(&self, other: &LegacyContactInfo) -> Option<Ordering>
fn partial_cmp(&self, other: &LegacyContactInfo) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for LegacyContactInfo
impl Serialize for LegacyContactInfo
impl Eq for LegacyContactInfo
impl StructuralEq for LegacyContactInfo
impl StructuralPartialEq for LegacyContactInfo
Auto Trait Implementations§
impl RefUnwindSafe for LegacyContactInfo
impl Send for LegacyContactInfo
impl Sync for LegacyContactInfo
impl Unpin for LegacyContactInfo
impl UnwindSafe for LegacyContactInfo
Blanket Implementations§
source§impl<T> AbiEnumVisitor for Twhere
T: Serialize + AbiExample + ?Sized,
impl<T> AbiEnumVisitor for Twhere
T: Serialize + AbiExample + ?Sized,
default fn visit_for_abi(
&self,
digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>
source§impl<T> AbiEnumVisitor for Twhere
T: Serialize + ?Sized,
impl<T> AbiEnumVisitor for Twhere
T: Serialize + ?Sized,
default fn visit_for_abi(
&self,
_digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request