Default to use existing Bitcoin data directory
When the user runs npm install -g bitcore, it would be great if the installer checked for existing bitcoin data directories (in the default locations for the user's OS) and used those. It could fall back to the standard ~/.bitcore/data directory.
+1
This would be nice for us people running nodes that want to switch over to bitcore.
txindex needs to be enabled, so this condition would need to be checked beforehand. Do you think this is common enough to check, and default to?
I think docs explaining the command line option -d with the create command works for that use case (More info: https://bitcore.io/guides/full-node).
I doubt many users have txindex enabled (being non-default), but I think it's very likely that many users installing Bitcore have a fully-synced instance of Bitcoind.
Would it be possible to use an existing data directory to at least avoid having to download all the blocks again? It may take a few hours to reindex all transactions anyway, but that's probably much better than >24 hour from-scratch sync times and block data being duplicated.
Yes, adding txindex=1 and reindex=1 and restarting, and then after shutting down remove the reindex=1 from bitcoin.conf, otherwise it will reindex again the next time it's started. I'm not sure on the timespan for reindexing with txindex to know if there are significant advantages.
closing, won't be relevant on bitcore-node v8 as you will just configure a connection to a node over p2p
@DanielRHayes can you please add some details? Do you mean this module: https://github.com/bitpay/bitcore-node/blob/master/docs/services/p2p.md?
Should I put my bitcoind values there?