27
15
I am reading "Mastering Bitcoin" written by Andreas and I found this explanation about "txindex option"
Transaction Database Index and txindex Option
By default, Bitcoin Core builds a database containing only the transactions related to the user’s wallet. If you want to be able to access any transaction with commands like gettransaction, you need to configure Bitcoin Core to build a complete transaction index, which can be achieved with the txindex option. Set txindex=1 in the Bitcoin Core configuration file
I am not sure what situations should I enable the option. In my understanding, I can set txindex=0 if I use bitcoind as just a transmission tool of Bitcoin so that I can save data and time to sync the blockchain data. Otherwise, if I intend to make a blockexplore site like Blockchain.info, I need to set txindex=1.
Is my understanding of this correct?
♦ Thank you very much for your prompt reply. I understood it. I expected that I could save a lot of time to sync the blockchain but it would be not true as far as I read your answer. – zono – 2015-01-24T16:32:38.223
Does setting txindex=1 or reindex=1 cause a new download? The prod chain is so big, I would like to avoid that if possible. – Steve Hibbert – 2017-04-03T13:42:43.980
@SteveHibbert no, it doesn't re-download the data, because you should already have the data on disk, it just reprocesses the data you have. It is still time consuming, though. – morsecoder – 2017-04-03T13:52:07.820
@StephenM347 Great, thanks for that, much obliged. – Steve Hibbert – 2017-04-03T15:17:09.470