<p>You can check the debug logs (might require <code>-debug</code> flag) and see if it is indexing transactions:</p>

<pre><code>$ tail -f ~/.bitcoin/debug.log
</code></pre>

<p>You can also try to get a transaction by txid, and if it returns transaction data, then the blockchain has been indexed for transactions (might have to wait for sync to complete):</p>

<pre><code>$ bitcoin-cli getrawtransaction {txid}
</code></pre>

CC BY-SA 4.0
2018-12-08T16:35:12.660Z
Will this ensure that the txindex contains all transactions, even those from blocks that were downloaded before -txindex was enabled?
Nate Eldredge
CC BY-SA 4.0
2020-02-15T19:38:45.407Z
@NateEldredge You can test it by fetching the transaction from block 1: `bitcoin-cli -datadir=. getrawtransaction $(bitcoin-cli -datadir=. getblock 00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048 | jq -r '.tx[0]')`
Janus Troelsen
CC BY-SA 4.0
2018-12-07T20:21:37.577Z
2018-12-07T21:24:53.900Z
2018-12-07T21:24:53.900Z
JBaczuk
<p>This might be a dumb question: I started the Bitcoin daemon for an initial blockchain download. It immediately started downloading, I edited the Bitcoin.conf file with txindex=1. Stopped and restarted the daemon. How can I be sure the blockchain has txindex=1 correctly set? Should I reminded with the command line Bitcoind -reindex</p>

<p>How can I understand “looking” at a blockchain (day I downloaded from a torrent) that has txindex=1? Thanks</p>

<bitcoind><synchronization><reindex><txindex>
Txindex=1: how to recognise the blockchain with this option?
Carl
# Txindex=1: how to recognise the blockchain with this option?

(Asked by: username_0 on 2018-12-07)

This might be a dumb question: I started the Bitcoin daemon for an initial blockchain download. It immediately started downloading, I edited the Bitcoin.conf file with txindex=1. Stopped and restarted the daemon. How can I be sure the blockchain has txindex=1 correctly set? Should I reminded with the command line Bitcoind -reindex

How can I understand “looking” at a blockchain (day I downloaded from a torrent) that has txindex=1? Thanks

**Tags:** bitcoind, synchronization, reindex, txindex


---

## 1 answers

### Answer by username_1 on 2018-12-07. Score: 1

You can check the debug logs (might require `-debug` flag) and see if it is indexing transactions:

```
$ tail -f ~/.bitcoin/debug.log

```

You can also try to get a transaction by txid, and if it returns transaction data, then the blockchain has been indexed for transactions (might have to wait for sync to complete):

```
$ bitcoin-cli getrawtransaction {txid}

```

> **Comments:**
> **username_2**: Will this ensure that the txindex contains all transactions, even those from blocks that were downloaded before -txindex was enabled?  
> **username_3**: @username_2 You can test it by fetching the transaction from block 1: `bitcoin-cli -datadir=. getrawtransaction $(bitcoin-cli -datadir=. getblock 00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048 | jq -r '.tx[0]')`  

---

