Reputation: 19
I'm trying to get a fully indexed transaction history in bitcoin on my local machine in order to query specific "foreign" transactions. As instructed, I've set txindex=1 in /home/me/.bitcoin/bitcoin.conf, which now reads:
rpcpassword=mypass
txindex=1
I run "bitcoind -reindex" in the terminal and it processes and processes.... and processes. I can see that it's using some system resources through "ps aux | grep bit" but the process never seems to die. I let it run for over a week and it never seemed to finish.
I've seen other people report reindexing with the txindex on only taking a matter of hours, so I'm at a loss to figure out what is going on. I thought maybe that the bitcoind -reindex was just not resulting in an exit code since, after all, it's a daemon that's supposed to run all the time. But when I stopped it and restarted it (without the "reindex" flag), I still get errors if I run "getrawtransaction XXXX" on old transactions.
I'm running ubuntu linux. Is there a way I can monitor the reindex process to see how long it's going to take? Am I doing something wrong that it should take so much time to reindex? Am I doing something wrong in general?
Appreciate any help.
Upvotes: 1
Views: 1578
Reputation: 21
You can check the status with this command:
bitcoin-cli getblockchaininfo
bitcoin@alfa:~/.bitcoin/blocks$ bitcoin-cli getblockchaininfo
{
"chain" : "main",
"blocks" : 156942,
"headers" : 156942,
"bestblockhash" : "00000000000005ae04a5657be198c038a87bee8b8cdc51ff079536493c887ba9",
"difficulty" : 1090715.68005127,
"verificationprogress" : 0.00897010,
"chainwork" : "000000000000000000000000000000000000000000000009fd73b127af545deb",
"pruned" : false,
"softforks" : [
{
[...]
More info about bitcoin-cli can be found at: https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs
Upvotes: 1