<p>Suppose I have a random transaction which I recovered from blockchain blk****.dat file.</p>

<p>How can I calculate the number of confirmations of this transaction? I dont want to use the RPC call getrawtrasaction.</p>

CC BY-SA 4.0
2020-01-06T02:56:51.187Z
You can't without knowing which block the transaction was in.
Pieter Wuille
CC BY-SA 4.0
2020-01-07T22:34:11.317Z
Why do you not want to use the getrawtransaction command?
Septem151
CC BY-SA 4.0
2020-01-08T23:55:22.680Z
Because I want to parse my own way
Allan Romanato
CC BY-SA 4.0
2020-01-09T20:56:41.960Z
@Allan Parsing cannot help you because the number of confirmations is not contained in the transaction. It depends on the number of blocks built on top.
Pieter Wuille
CC BY-SA 4.0
2020-01-10T22:29:18.990Z
Ok, so how I can get the number of the block which is built on? With that, I can calculate. Actualblock - BlockWhichTransactionIsIn = NumberOfConfs
Allan Romanato
<bitcoin-core><full-node>
Hexadecimal Bitcoin Transactions
Allan Romanato
# Hexadecimal Bitcoin Transactions

(Asked by: username_0 on 2020-01-05)

Suppose I have a random transaction which I recovered from blockchain blk\*\*\*\*.dat file.

How can I calculate the number of confirmations of this transaction? I dont want to use the RPC call getrawtrasaction.

**Tags:** bitcoin-core, full-node

> **Comments:**
> **username_1**: You can't without knowing which block the transaction was in.  
> **username_2**: Why do you not want to use the getrawtransaction command?  
> **username_0**: Because I want to parse my own way  
> **username_1**: @username_0 Parsing cannot help you because the number of confirmations is not contained in the transaction. It depends on the number of blocks built on top.  
> **username_0**: Ok, so how I can get the number of the block which is built on? With that, I can calculate. Actualblock - BlockWhichTransactionIsIn = NumberOfConfs  

---

## 0 answers

