<p>As you can see in the <a href="https://en.bitcoin.it/wiki/Protocol_specification" rel="nofollow noreferrer">protocol documentation</a> the <a href="https://en.bitcoin.it/wiki/Protocol_specification#inv" rel="nofollow noreferrer">inv</a>-object contains a field inventory (<a href="https://en.bitcoin.it/wiki/Protocol_specification#Inventory_Vectors" rel="nofollow noreferrer">Inventory Vector</a>). </p>

<p>Inv-Object:</p>

<p><img src="https://i.sstatic.net/r1JGo.png" alt="Inv-Object field table"></p>

<p>Inventory Vector:</p>

<p><img src="https://i.sstatic.net/ohsNt.jpg" alt="Inventory Vector field table"></p>

<p>You need to check the type field to know what the other node is sending. You will always receive a hash value, which is the identifier of a block or transaction.</p>

CC BY-SA 3.0
2014-06-22T09:50:20.217Z
2015-06-10T11:50:04.343Z
2015-06-10T11:50:04.343Z
Dennis Kriechel
<p>I am reading the Bitcoin wiki, and I see the inv message structure. I see it has a counter field for the objects and an inventory field. This inventory field has a list of objects (transactions or blocks), and I do wonder what it sends to the neighbors as to check if they have the transaction or block relayed. For example, is the block sent with its hash or with an id?</p>

CC BY-SA 3.0
2015-06-10T12:51:36.950Z
A block's hash is its id.
Pieter Wuille
<protocol><p2p><message>
Inv message structure
angel limneos
# Inv message structure

(Asked by: username_0 on 2014-06-17)

I am reading the Bitcoin wiki, and I see the inv message structure. I see it has a counter field for the objects and an inventory field. This inventory field has a list of objects (transactions or blocks), and I do wonder what it sends to the neighbors as to check if they have the transaction or block relayed. For example, is the block sent with its hash or with an id?

**Tags:** protocol, p2p, message

> **Comments:**
> **username_1**: A block's hash is its id.  

---

## 1 answers

### Answer by username_2 on 2014-06-22. Score: 3 | Accepted answer

As you can see in the [protocol documentation](https://en.bitcoin.it/wiki/Protocol_specification) the [inv](https://en.bitcoin.it/wiki/Protocol_specification#inv)-object contains a field inventory ([Inventory Vector](https://en.bitcoin.it/wiki/Protocol_specification#Inventory_Vectors)).

Inv-Object:

![Inv-Object field table](https://i.sstatic.net/r1JGo.png)

Inventory Vector:

![Inventory Vector field table](https://i.sstatic.net/ohsNt.jpg)

You need to check the type field to know what the other node is sending. You will always receive a hash value, which is the identifier of a block or transaction.


---

