Struct ethp2p::GetBlockHeaders
source · [−]pub struct GetBlockHeaders {
pub start_block: BlockHashOrNumber,
pub limit: u64,
pub skip: u32,
pub reverse: bool,
}
Expand description
A request for a peer to return block headers starting at the requested block.
The peer must return at most limit
headers.
If the reverse
field is true
, the headers will be returned starting
at start_block
, traversing towards the genesis block.
Otherwise, headers will be returned starting at start_block
,
traversing towards the latest block.
If the skip
field is non-zero, the peer must skip that amount of headers
in the the direction specified by reverse
.
Fields
start_block: BlockHashOrNumber
The block number or hash that the peer should start returning headers from.
limit: u64
The maximum number of headers to return.
skip: u32
The number of blocks that the node should skip while traversing and returning headers.
A skip value of zero denotes that the peer should return contiguous heaaders, starting from
start_block
and returning at most limit
headers.
reverse: bool
Whether or not the headers should be returned in reverse order.
Trait Implementations
sourceimpl Clone for GetBlockHeaders
impl Clone for GetBlockHeaders
sourcefn clone(&self) -> GetBlockHeaders
fn clone(&self) -> GetBlockHeaders
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for GetBlockHeaders
impl Debug for GetBlockHeaders
sourceimpl Decodable for GetBlockHeaders
impl Decodable for GetBlockHeaders
sourceimpl Encodable for GetBlockHeaders
impl Encodable for GetBlockHeaders
sourceimpl PartialEq<GetBlockHeaders> for GetBlockHeaders
impl PartialEq<GetBlockHeaders> for GetBlockHeaders
sourcefn eq(&self, other: &GetBlockHeaders) -> bool
fn eq(&self, other: &GetBlockHeaders) -> bool
impl Copy for GetBlockHeaders
impl Eq for GetBlockHeaders
impl StructuralEq for GetBlockHeaders
impl StructuralPartialEq for GetBlockHeaders
Auto Trait Implementations
impl RefUnwindSafe for GetBlockHeaders
impl Send for GetBlockHeaders
impl Sync for GetBlockHeaders
impl Unpin for GetBlockHeaders
impl UnwindSafe for GetBlockHeaders
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.