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: ProtocolVersion
protocol version of the sender
capabilities: Capabilities
capabilities of the sender
nonce: u64
randomly generated for each handshake, helps detect self
genesis: Hash
genesis block of our chain, only connect to peers on the same chain
total_difficulty: Difficulty
total difficulty accumulated by the sender, used to check whether sync may be needed
sender_addr: PeerAddr
network address of the sender
receiver_addr: PeerAddr
network address of the receiver
user_agent: String
name 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