Struct bitcoin::network::message_blockdata::GetBlocksMessage [] [src]

pub struct GetBlocksMessage {
    pub version: u32,
    pub locator_hashes: Vec<Sha256dHash>,
    pub stop_hash: Sha256dHash,
}

The getblocks message

Fields

version: u32

The protocol version

locator_hashes: Vec<Sha256dHash>

Locator hashes --- ordered newest to oldest. The remote peer will reply with its longest known chain, starting from a locator hash if possible and block 1 otherwise.

stop_hash: Sha256dHash

References the block to stop at, or zero to just fetch the maximum 500 blocks

Methods

impl GetBlocksMessage
[src]

fn new(locator_hashes: Vec<Sha256dHash>, stop_hash: Sha256dHash) -> GetBlocksMessage

Construct a new getblocks message

Trait Implementations

impl Debug for GetBlocksMessage
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Clone for GetBlocksMessage
[src]

fn clone(&self) -> GetBlocksMessage

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Eq for GetBlocksMessage
[src]

impl PartialEq for GetBlocksMessage
[src]

fn eq(&self, __arg_0: &GetBlocksMessage) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &GetBlocksMessage) -> bool

This method tests for !=.

impl<S: SimpleEncoder> ConsensusEncodable<S> for GetBlocksMessage
[src]

fn consensus_encode(&self, s: &mut S) -> Result<(), S::Error>

Encode an object with a well-defined format

impl<D: SimpleDecoder> ConsensusDecodable<D> for GetBlocksMessage
[src]

fn consensus_decode(d: &mut D) -> Result<GetBlocksMessage, D::Error>

Decode an object with a well-defined format