Equity
Bitcoin Protocol Library
|
Represents an object in an inventory message. More...
#include <Inventory.h>
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. | |
Represents an object in an inventory message.
Used in inventory requests for notifying other nodes about objects that they have or are requesting.
InventoryId::InventoryId | ( | TypeId | type, |
Crypto::Sha256Hash const & | hash | ||
) |
type | type of inventory |
hash | hash id of the inventory |
InventoryId::InventoryId | ( | uint8_t const *& | in, |
size_t & | size | ||
) |
[in,out] | in | |
[in,out] | size |