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

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.
Checks if this value is equivalent to the given key. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
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