<p>As the name suggests, it is the block hash, not the merkle root hash. It is the hash of the block header which includes the merkle root hash. To learn whether your tx is included in a block, you will need to fetch the block with that hash and then search for your transaction within that block. You can do this by using the <code>getblock</code> RPC after receiving the ZMQ message. You could also use the <code>rawblock</code> ZMQ channel and receive the entire block in full, but that will also mean that you need to implement block parsing.</p>
<p>Even if you could just get the merkle root, the merkle root itself does not contain sufficient information to determine whether a particular transaction is included in that block. You still need to get the full block and search the transactions list for your transaction.</p>

CC BY-SA 4.0
2021-04-26T16:51:52.667Z
2021-04-26T16:51:52.667Z
Ava Chow
<p>I am using the <code>ZMQ interface</code> of my node to keep track of wallet activity like incoming transactions. I want to know the number of confirmations of my transaction but, to do that, I would need to know in which block the tx is included and calculate from that block onwards.</p>
<p>I was thinking that I could watch for the ZMQ channel <code>hashblock</code> but there is not much documentation about these channels. Is this <code>hashblock</code> a merkle root hash?</p>

<merkle-tree><zeromq><merkleblock>
Is the hash of ZMQ channel blockhash a merkleroot hash?
Jesse de gans
# Is the hash of ZMQ channel blockhash a merkleroot hash?

(Asked by: username_0 on 2021-04-26)

I am using the `ZMQ interface` of my node to keep track of wallet activity like incoming transactions. I want to know the number of confirmations of my transaction but, to do that, I would need to know in which block the tx is included and calculate from that block onwards.

I was thinking that I could watch for the ZMQ channel `hashblock` but there is not much documentation about these channels. Is this `hashblock` a merkle root hash?

**Tags:** merkle-tree, zeromq, merkleblock


---

## 1 answers

### Answer by username_1 on 2021-04-26. Score: 2 | Accepted answer

As the name suggests, it is the block hash, not the merkle root hash. It is the hash of the block header which includes the merkle root hash. To learn whether your tx is included in a block, you will need to fetch the block with that hash and then search for your transaction within that block. You can do this by using the `getblock` RPC after receiving the ZMQ message. You could also use the `rawblock` ZMQ channel and receive the entire block in full, but that will also mean that you need to implement block parsing.

Even if you could just get the merkle root, the merkle root itself does not contain sufficient information to determine whether a particular transaction is included in that block. You still need to get the full block and search the transactions list for your transaction.


---

