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]
impl GetBlocksMessage
pub fn new(
locator_hashes: Vec<Sha256dHash>,
stop_hash: Sha256dHash
) -> GetBlocksMessage
[src]
pub fn new(
locator_hashes: Vec<Sha256dHash>,
stop_hash: Sha256dHash
) -> GetBlocksMessage
Construct a new getblocks
message
Trait Implementations
impl PartialEq for GetBlocksMessage
[src]
impl PartialEq for GetBlocksMessage
fn eq(&self, other: &GetBlocksMessage) -> bool
[src]
fn eq(&self, other: &GetBlocksMessage) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &GetBlocksMessage) -> bool
[src]
fn ne(&self, other: &GetBlocksMessage) -> bool
This method tests for !=
.
impl Eq for GetBlocksMessage
[src]
impl Eq for GetBlocksMessage
impl Clone for GetBlocksMessage
[src]
impl Clone for GetBlocksMessage
fn clone(&self) -> GetBlocksMessage
[src]
fn clone(&self) -> GetBlocksMessage
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for GetBlocksMessage
[src]
impl Debug for GetBlocksMessage
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<S: SimpleEncoder> ConsensusEncodable<S> for GetBlocksMessage
[src]
impl<S: SimpleEncoder> ConsensusEncodable<S> for GetBlocksMessage
fn consensus_encode(&self, s: &mut S) -> Result<(), Error>
[src]
fn consensus_encode(&self, s: &mut S) -> Result<(), Error>
Encode an object with a well-defined format
impl<D: SimpleDecoder> ConsensusDecodable<D> for GetBlocksMessage
[src]
impl<D: SimpleDecoder> ConsensusDecodable<D> for GetBlocksMessage
fn consensus_decode(d: &mut D) -> Result<GetBlocksMessage, Error>
[src]
fn consensus_decode(d: &mut D) -> Result<GetBlocksMessage, Error>
Decode an object with a well-defined format
Auto Trait Implementations
impl Send for GetBlocksMessage
impl Send for GetBlocksMessage
impl Sync for GetBlocksMessage
impl Sync for GetBlocksMessage