My copy of
blkindex.dat became corrupted, but I still have the whole
Is it possible to reconstruct the
blkindex.dat file from the
blk0001.dat file or do I have to delete both files and redownload the whole blockchain from scratch?
Edit: Pieter's answer is working for me. It's taking many hours to run, but at least it isn't using any bandwidth. I'm wondering, as a related question, whether this
bitcoind -loadblock=blk0001.dat.bak technique is a way of being able to get a trusted copy of the blockchain from an untrusted source. If I download a blk0001.dat from a random website, then import it using this -loadblock command, does that ensure it's correct, and ask the network for anything the download was missing?
While running, the command just said:
SetBestChain: new best=00000000000004411998 height=174305 work=284206530118085534778 SetBestChain: new best=00000000000009a01d64 height=174306 work=284213516218692473063 InvalidChainFound: invalid block=000000000000038181de height=174307 work=284220502319299411348 InvalidChainFound: current best=00000000000009a01d64 height=174306 work=284213516218692473063 SetBestChain: new best=00000000000007e352ec height=174307 work=284220502319299411348 SetBestChain: new best=00000000000006b4b91c height=174308 work=284227488419906349633
Is that normal, representing an orphaned block? Or possibly the result of the same disk error that caused the
blkindex.dat to become corrupted initially?