<p>Changing the txindex setting no longer requires a reindex since version 0.17.0 (see <a href="https://bitcoincore.org/en/releases/0.17.0/" rel="noreferrer">https://bitcoincore.org/en/releases/0.17.0/</a>, under &quot;Transaction index changes). It'll update just the txindex itself whenever it's out of sync automatically.</p>
<p>So:</p>
<ol>
<li><p>It doesn't inject a reindex (which would cause throwing away the entire chainstate database, and rebuilding it). It just detects the txindex is out of date, and scans the unindexed part of the chain in the background.</p>
</li>
<li><p>The command is &quot;bitcoin-qt&quot;, almost certainly, with nothing more.</p>
</li>
</ol>

CC BY-SA 4.0
2020-12-02T05:10:30.607Z
Ah, wonderful. the txindex is stored separately now. So great to see the node software continue to get better over time. Thank you for the answer & for all you do !
lollercoaster
CC BY-SA 4.0
2020-11-30T07:26:29.023Z
2020-11-30T08:34:07.457Z
2020-11-30T08:34:07.457Z
Pieter Wuille
<p>I sync'd a Bitcoin node with Bitcoin Core Qt GUI. Hundreds of GB, naturally.</p>
<p>I realized I needed txindex on for Lightning node stuff, so I changed the configuration file via the GUI to include <code>txindex=1</code>. I launched it on my Mac and then slapped myself in the face—how would I tell it to reindex instead of throwing away my database?? Didn't wanna download all those GB again.</p>
<p>But then I noticed debug.log started saying this:</p>
<pre><code>2020-11-30T06:07:43Z Syncing txindex with block chain from height 498564
2020-11-30T06:08:28Z Syncing txindex with block chain from height 500148
</code></pre>
<p>which, if I remember right means it's doing a reindex, not a full-blown restart of a sync. Checked on disk, and indeed, files still there.</p>
<p>I'm grateful, but also mystified. Questions:</p>
<ol>
<li>Does Bitcoin Core see when you're about to throw away a full sync with <code>txindex=1</code> and then inject a <code>-reindex</code> into the start command?</li>
<li>How can I see the startup command that <code>bitcoin-qt</code> uses when I start with with the Mac OSX launcher?</li>
</ol>

<bitcoin-core><bitcoind><reindex><txindex>
Does Bitcoin Core automatically reindex when you enable txindex on a synced full node?
lollercoaster
# Does Bitcoin Core automatically reindex when you enable txindex on a synced full node?

(Asked by: username_0 on 2020-11-30)

I sync'd a Bitcoin node with Bitcoin Core Qt GUI. Hundreds of GB, naturally.

I realized I needed txindex on for Lightning node stuff, so I changed the configuration file via the GUI to include `txindex=1`. I launched it on my Mac and then slapped myself in the face—how would I tell it to reindex instead of throwing away my database?? Didn't wanna download all those GB again.

But then I noticed debug.log started saying this:

```
2020-11-30T06:07:43Z Syncing txindex with block chain from height 498564
2020-11-30T06:08:28Z Syncing txindex with block chain from height 500148

```

which, if I remember right means it's doing a reindex, not a full-blown restart of a sync. Checked on disk, and indeed, files still there.

I'm grateful, but also mystified. Questions:

1. Does Bitcoin Core see when you're about to throw away a full sync with `txindex=1` and then inject a `-reindex` into the start command?
2. How can I see the startup command that `bitcoin-qt` uses when I start with with the Mac OSX launcher?

**Tags:** bitcoin-core, bitcoind, reindex, txindex


---

## 1 answers

### Answer by username_1 on 2020-11-30. Score: 6 | Accepted answer

Changing the txindex setting no longer requires a reindex since version 0.17.0 (see <https://bitcoincore.org/en/releases/0.17.0/>, under "Transaction index changes). It'll update just the txindex itself whenever it's out of sync automatically.

So:

1. It doesn't inject a reindex (which would cause throwing away the entire chainstate database, and rebuilding it). It just detects the txindex is out of date, and scans the unindexed part of the chain in the background.
2. The command is "bitcoin-qt", almost certainly, with nothing more.

> **Comments:**
> **username_0**: Ah, wonderful. the txindex is stored separately now. So great to see the node software continue to get better over time. Thank you for the answer & for all you do !  

---

