0
I'd like to iterate through the entire block chain using RPC. The process I intend to do is:
- getblockhash 1
- getblock (input of #1 here)
- iterate through each transaction with GetRawtransaction (input of tx field here)
- After getting all transactions, call getblockhash 2 (or goto nextblockhash in block)
I just want to make sure I'm enumerating the chain correctly
The above seems correct. Most probably you will also want to DecodeRawTransaction after step 3. If performance is a requirement and you are already indexing all transactions (txindex=1) consider parsing your blk*.dat local files which will be way more faster than the RPC based approach. This should help: https://en.bitcoin.it/wiki/Data_directory#blocks_subdirectory
– George Kimionis – 2014-03-13T20:22:02.917