hi, i did some unethical "stress testing". Deleted all the data, started to re-download everything. after some time, i repeatedly killed it via pkill -9 bitcoin. well, that worked fine.
then I started to delete some random files and now it no longer loads!
What I would expect is to detect a corrupt database, some re-indexing action, or just a nice notice that it has to redo everything due to corruption. instead:
a box "
error initializing block database" -> OK -> core dumped :-(
the random files i deleted:
rm ./blocks/index/000189.sst ./chainstate/000012.sst
debug.log:
Bitcoin version v0.8.0rc1-beta (2013-02-06 16:06:43 -0500)
Using OpenSSL version OpenSSL 0.9.8k 25 Mar 2009
Startup time: 2013-02-11 11:12:57
Default data directory /users/XXX/.bitcoin
Used data directory /users/XXX/.bitcoin
Using 2 threads for script verification
init message: Verifying wallet integrity...
dbenv.open LogDir=/users/XXX/.bitcoin/database ErrorFile=/users/XXX/.bitcoin/db.log
Bound to [::]:8333
Bound to 0.0.0.0:8333
init message: Loading block index...
Opening LevelDB in /users/XXX/.bitcoin/blocks/index
Opened LevelDB successfully
Opening LevelDB in /users/XXX/.bitcoin/chainstate
Opened LevelDB successfully
LoadBlockIndex(): last block file = 0
LoadBlockIndex(): last block file: CBlockFileInfo(blocks=86483, size=37352096, heights=0..86479, time=2009-01-03..2010-10-20)
LoadBlockIndex(): transaction index disabled
LoadBlockIndex(): hashBestChain=00000000001aa62850aea3dda34b3a9af269a0cac44c3ea481206bdfdf5dfd91 height=79504 date=2010-09-13 13:05:59
Initializing databases...
000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
CBlock(hash=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f, ver=1, hashPrevBlock=0000000000000000000000000000000000000000000000000000000000000000, hashMerkleRoot=4a5e1e4baa, nTime=1231006505, nBits=1d00ffff, nNonce=2083236893, vtx=1)
CTransaction(hash=4a5e1e4baa, ver=1, vin.size=1, vout.size=1, nLockTime=0)
CTxIn(COutPoint(0000000000, 4294967295), coinbase 04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73)
CTxOut(nValue=50.00000000, scriptPubKey=04678afdb0fe5548271967f1a67130)
vMerkleTree: 4a5e1e4baa
ERROR: AddToBlockIndex() : 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f already exists
ERROR: LoadBlockIndex() : genesis block not accepted
PS: relevant files that are still alive:
./chainstate/000022.log
./chainstate/000015.sst
./chainstate/MANIFEST-000021
./chainstate/CURRENT
./chainstate/LOCK
./chainstate/000013.sst
./chainstate/LOG
./chainstate/LOG.old
./blocks/rev00000.dat
./blocks/blk00000.dat
./blocks/index/MANIFEST-000221
./blocks/index/000188.sst
./blocks/index/000222.sst
./blocks/index/000223.log
./blocks/index/000191.sst
./blocks/index/000216.sst
./blocks/index/000219.sst
./blocks/index/CURRENT
./blocks/index/LOCK
./blocks/index/000224.sst
./blocks/index/000190.sst
./blocks/index/000187.sst
./blocks/index/000211.sst
./blocks/index/LOG
./blocks/index/000213.sst
./blocks/index/LOG.old
PPS: and after deleting everything,
I also had a corrupted wallet. (nothing lost, don't worry, but just let you know that for some reason, it got corrupted during that treatment! likely (?) due to the forced shutdown while it was still open). … and yes, it was fine before, and it's size was around 100k before and afterwards.