11

I spent a ton of time today trying to get Bitcoin-Qt to sync using the bootstrap.dat file and could not get it to work. I found an answer on this forum saying to use: /Applications/Bitcoin-Qt.app/Contents/MacOS/Bitcoin-Qt -rescan -reindex

Which seems to have worked perfectly. Now I'm just wondering what exactly that command did to fix the problem?

1 Answer 1

21

-rescan likely did nothing at all. It goes through the blockchain to find transactions that are missing from your wallet. It is only very rarely needed (like when you manually changed things in wallet.dat).

-reindex throws away the block chain index and chain state (the database of all unspent transaction outputs), and rebuilds those from scratch. It is exactly like downloading the block chain again from peers, except the blocks already on disk are used.

4
  • Does -reindex fix corrupted blk files? Say I deleted a random one, will that get downloaded in the process, without having to download the full blockchain?
    – Giszmo
    Mar 22, 2019 at 22:50
  • Is -assumevalid=0 making sure my blk files are getting verified when running a -reindex?
    – Giszmo
    Mar 22, 2019 at 23:02
  • 1
    -reindex does not fix corrupted files, but it will detect missing or corrupted ones. In that case the normal block download process from network will start over wherever things went wrong. Nov 16, 2019 at 18:24
  • -assumevalid=0 only changes whether historical scripts are validated or not (both during normal validation and during reindex). Without it, everything except scripts is still validated. Nov 16, 2019 at 18:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.