Equity
Bitcoin Protocol Library
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Network::GetBlocksMessage Class Reference

A get-blocks message. More...

#include <GetBlocksMessage.h>

Inheritance diagram for Network::GetBlocksMessage:
Network::Message P2p::Serializable

Public Member Functions

 GetBlocksMessage (uint32_t version, Crypto::Sha256HashList const &hashes, Crypto::Sha256Hash const &last)
 
 GetBlocksMessage (uint8_t const *&in, size_t &size)
 
Overrides Serializable
virtual void serialize (std::vector< uint8_t > &out) const override
 
virtual json toJson () const override
 
- Public Member Functions inherited from Network::Message
 Message (char const *type)
 
std::string type () const
 Returns the type.
 

Public Attributes

uint32_t version_
 The protocol version.
 
Crypto::Sha256HashList hashes_
 List of block hashes to look for.
 
Crypto::Sha256Hash last_
 Last hash to return.
 

Static Public Attributes

static char const TYPE [] = "getblocks"
 Message type.
 

Detailed Description

A get-blocks message.

Requests an inventory message containing the list of blocks starting right after the last known hash in the block locator object, up to hash_stop or 500 blocks, whichever comes first.

See also
InventoryMessage

Constructor & Destructor Documentation

GetBlocksMessage::GetBlocksMessage ( uint32_t  version,
Crypto::Sha256HashList const &  hashes,
Crypto::Sha256Hash const &  last 
)
Parameters
versionprotocol version
hashesrequested blocks
lastlast hash to return
GetBlocksMessage::GetBlocksMessage ( uint8_t const *&  in,
size_t &  size 
)
Parameters
[in,out]inpointer to the next byte to deserialize
[in,out]sizenumber of bytes remaining in the serialized stream

The documentation for this class was generated from the following files: