My block database became corrupt:
After clicking OK I get:
Which appears to be a bug. When I now click OK Bitcoin Core crashes:
After restarting it I get:
At this point nothing changes when I restart again.
The log says:
2016-08-16 12:52:42 Bitcoin version v0.12.1 (2016-04-11 13:01:43 +0200) 2016-08-16 12:52:42 InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1 2016-08-16 12:52:43 GUI: “registerShutdownBlockReason: Successfully registered: Bitcoin Core didn’t yet exit safely…” 2016-08-16 12:52:44 Using BerkeleyDB version Berkeley DB 4.8.30: (April 9, 2010) 2016-08-16 12:52:44 Default data directory C:\Users\x\AppData\Roaming\Bitcoin 2016-08-16 12:52:44 Using data directory C:\Users\x\AppData\Roaming\Bitcoin 2016-08-16 12:52:44 Using config file C:\Users\x\AppData\Roaming\Bitcoin\bitcoin.conf 2016-08-16 12:52:44 Using at most 125 connections (2048 file descriptors available) 2016-08-16 12:52:44 Using 8 threads for script verification 2016-08-16 12:52:44 scheduler thread start 2016-08-16 12:52:44 HTTP: creating work queue of depth 16 2016-08-16 12:52:44 Config options rpcuser and rpcpassword will soon be deprecated. Locally-run instances may remove rpcuser to use cookie-based auth, or may be replaced with rpcauth. Please see share/rpcuser for rpcauth auth generation. 2016-08-16 12:52:44 HTTP: starting 4 worker threads 2016-08-16 12:52:44 Using wallet wallet.dat 2016-08-16 12:52:44 init message: Verifying wallet… 2016-08-16 12:52:44 CDBEnv::Open: LogDir=C:\Users\x\AppData\Roaming\Bitcoin\database ErrorFile=C:\Users\x\AppData\Roaming\Bitcoin\db.log 2016-08-16 12:52:44 Cache configuration: 2016-08-16 12:52:44 * Using 128.0MiB for block index database 2016-08-16 12:52:44 * Using 232.0MiB for chain state database 2016-08-16 12:52:44 * Using 664.0MiB for in-memory UTXO set 2016-08-16 12:52:44 init message: Loading block index… 2016-08-16 12:52:44 Opening LevelDB in C:\Users\x\AppData\Roaming\Bitcoin\blocks\index 2016-08-16 12:52:44 Opened LevelDB successfully 2016-08-16 12:52:44 Using obfuscation key for C:\Users\x\AppData\Roaming\Bitcoin\blocks\index: 0000000000000000 2016-08-16 12:52:44 Opening LevelDB in C:\Users\x\AppData\Roaming\Bitcoin\chainstate 2016-08-16 12:52:44 Opened LevelDB successfully 2016-08-16 12:52:44 Using obfuscation key for C:\Users\x\AppData\Roaming\Bitcoin\chainstate: ceb7ff593b2a09a4 2016-08-16 12:52:44 LoadBlockIndexDB: last block file = 0 2016-08-16 12:52:44 LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=0, size=0, heights=0…0, time=1970-01-01…1970-01-01) 2016-08-16 12:52:44 Checking all blk files are present… 2016-08-16 12:52:44 LoadBlockIndexDB: transaction index enabled 2016-08-16 12:52:44 Initializing databases… 2016-08-16 12:52:44 Pre-allocating up to position 0x1000000 in blk00000.dat
Hope this helps find the problem.
I now delete chainstate
and database
and db.log
. The app can now start and syncs with the network. For some reason it does not find the blocks that are still on disk (I did not touch the blocks folder when deleting files). Something about them must have gotten corrupted previously (bug?). I would have liked if I was warned that the existing blocks could not be used instead of silently ignoring them (potential improvement).