pub struct Hand {
pub version: ProtocolVersion,
pub capabilities: Capabilities,
pub nonce: u64,
pub genesis: Hash,
pub total_difficulty: Difficulty,
pub sender_addr: PeerAddr,
pub receiver_addr: PeerAddr,
pub user_agent: String,
}Expand description
First part of a handshake, sender advertises its version and characteristics.
Fields§
§version: ProtocolVersionprotocol version of the sender
capabilities: Capabilitiescapabilities of the sender
nonce: u64randomly generated for each handshake, helps detect self
genesis: Hashgenesis block of our chain, only connect to peers on the same chain
total_difficulty: Difficultytotal difficulty accumulated by the sender, used to check whether sync may be needed
sender_addr: PeerAddrnetwork address of the sender
receiver_addr: PeerAddrnetwork address of the receiver
user_agent: Stringname of version of the software
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Hand
impl RefUnwindSafe for Hand
impl Send for Hand
impl Sync for Hand
impl Unpin for Hand
impl UnwindSafe for Hand
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more