1

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 conf 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?
3

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.

1
  • 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 Dec 2 '20 at 5:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.