Equity
Bitcoin Protocol Library
Public Types | Public Member Functions | Public Attributes | List of all members
Network::InventoryId Struct Reference

Represents an object in an inventory message. More...

#include <Inventory.h>

Inheritance diagram for Network::InventoryId:
P2p::Serializable

Public Types

enum  TypeId { TYPE_ERROR = 0, TYPE_TX = 1, TYPE_BLOCK = 2, TYPE_FILTERED_BLOCK = 3 }
 Object type ID. More...
 

Public Member Functions

 InventoryId (TypeId type, Crypto::Sha256Hash const &hash)
 
 InventoryId (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 Attributes

TypeId type_
 The ID of the type of the object.
 
Crypto::Sha256Hash hash_
 A hash representing the object.
 

Detailed Description

Represents an object in an inventory message.

Used in inventory requests for notifying other nodes about objects that they have or are requesting.

See also
InventoryMessage

Member Enumeration Documentation

Object type ID.

Enumerator
TYPE_ERROR 

Any data of with this number may be ignored.

TYPE_TX 

Hash is related to a transaction.

TYPE_BLOCK 

Hash is related to a data block.

TYPE_FILTERED_BLOCK 

Hash of a block header, but indicates that the reply should be a merkleblock message.

Constructor & Destructor Documentation

InventoryId::InventoryId ( TypeId  type,
Crypto::Sha256Hash const &  hash 
)
Parameters
typetype of inventory
hashhash id of the inventory
InventoryId::InventoryId ( uint8_t const *&  in,
size_t &  size 
)
Parameters
[in,out]in
[in,out]size
Returns

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