BlockStoreException - corrupted spvchain file

If you get an exception at startup with the text:

“Cannot open wallet because of an exception:
org.bitcoinj.store.BlockStoreException: org.bitcoinj.store.BlockStoreException:”

the Bitsquare.spvchain got corrupted.
That happens from time to time and is not hingcritical.
I will add an automated handling to one of the upcoming releases to remove a corrupted file in such a case.

This file stores the blcokchain data required for the SPV wallet. It can be re-downloaded any time, it just takes a bit for a resync, depending on the number of transactions you have been part of with your wallet addresses.

You can find that file in the data directory and then in the mainnet/bitcoin folder.
You can delete that file and then do a re-sync with a new startup.
After the app has synced, restart again. Then all should be ok again.

You can check if the balance is correct by opening the emergency wallet too with cmd+e.
There you can see the total balance. Compare that with the sum of available balance + reserved balance. It must be the same, otherwise report it here.

You can open the data directory at Account/Backup or if you want to open the data directory manually can find it under those locations:
Mac OSX: /Users/username/Library/Application Support/Bitsquare
Linux: /home/username/.local/share/Bitsquare
Windows 7,8: C:\Documents and Settings\username\AppData\Roaming\Bitsquare
Windows XP: C:\Documents and Settings\username\Application Data\Bitsquare

EDIT: since version 0.5 you can delete the spv file directly in the app at settings/network. that is the preferred way to do it as it forces by the app 2 times the restart.

1 Like