pub struct Status {
pub version: u8,
pub chain: Chain,
pub total_difficulty: U256,
pub blockhash: [u8; 32],
pub genesis: [u8; 32],
pub forkid: ForkId,
}
Expand description
The status message is used in the eth protocol handshake to ensure that peers are on the same network and are following the same fork. The total difficulty and best block hash are used to identify whether or not the requesting client should be sent historical blocks for a full blockchain sync.
When performing a handshake, the total difficulty is not guaranteed to correspond to the block hash. This information should be treated as untrusted.
Fields
version: u8
The current protocol version. For example, peers running eth/66
would have a version of
66.
chain: Chain
The chain id, as introduced in EIP155.
total_difficulty: U256
Total difficulty of the best chain.
blockhash: [u8; 32]
The highest difficulty block hash the peer has seen
genesis: [u8; 32]
The genesis hash of the peer’s chain.
forkid: ForkId
The fork identifier, a CRC32
checksum for
identifying the peer’s fork as defined by
EIP-2124.
This was added in eth/64
Trait Implementations
sourceimpl From<Status> for EthMessage
impl From<Status> for EthMessage
impl Copy for Status
impl Eq for Status
impl StructuralEq for Status
impl StructuralPartialEq for Status
Auto Trait Implementations
impl RefUnwindSafe for Status
impl Send for Status
impl Sync for Status
impl Unpin for Status
impl UnwindSafe for Status
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<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,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.