8
2
I am working on a Blockchain.info-like block explorer, and I have some questions regarding best practice for data retrieval. Bitcoin Core stores and serves all blocks and, if txindex is set to 1, all transactions too. It doesn't, however, have an option where you can tell it to maintain an index of all addresses.
I wrote a script that iterates through all blocks and inserts the address/txId key pairs into a MySQL table indexed on address. It maintains the index by polling for new blocks. The program doesn't yet take into account unconfirmed transactions, and chain reorganizations can result in invalid data. Is there a better way to do it?
1
This answer is a bit old already. Mind refreshing it? BitPay came to questionable fame in the SegWit2x drama and bitcore had no commit in two months. Toshi is 404 here. BtcDrak's patch was last updated a year ago, although others patched the missing two versions of bitcoin core.
– Giszmo – 2018-01-16T16:53:17.370