Page 1 of 1

When your database get corrupted or you end on wrong chain

Posted: Mon Dec 31, 2018 12:09 pm
by mst100
Windows

fastest way to get back on mining on right chain is to resync with bootstrap

stop mining and exit your wallet

go to zettelkasten blockcahin folder -> %appdata%\ZettelKasten

and delete everything except zettelkasten.conf and wallet.dat

download and extract bootstrap
https://zettelkasten.org/downloads/bootstrap.zip

start wallet again

now after you done this it will take for some while, it need to reindex and sync to current block

Re: When your database get corrupted or you end on wrong chain

Posted: Mon Dec 31, 2018 12:09 pm
by mst100
Linux daemon

fastest way to get back on mining on right chain is to resync with bootstrap

stop your daemon:

Code: Select all

cd ~/zettelkasten/src
./zettelkastend stop
go to zettel blockchain folder:

Code: Select all

cd ~/.zettelkasten
and delete everything except zettelkasten.conf and wallet.dat

Code: Select all

rm -Rf blocks  chainstate  db.log  debug.log  peers.dat
download and extract bootstrap, and delete zipped bootstrap:

Code: Select all

wget https://zettelkasten.org/downloads/bootstrap.zip
unzip bootstrap.zip 
rm -f bootstrap.zip 
start daemon again:

Code: Select all

cd ~/zettelkasten/src 
./zettelkastend

all steps in one line:

Code: Select all

cd ~/.zettelkasten && rm -Rf blocks  chainstate  db.log  debug.log  peers.dat && wget https://zettelkasten.org/downloads/bootstrap.zip && unzip bootstrap.zip && rm -f bootstrap.zip && cd ~/zettelkasten/src && ./zettelkastend
now after you done this it will take for some while, it need to reindex and sync to current block

Re: When your database get corrupted or you end on wrong chain

Posted: Fri Mar 08, 2019 12:49 pm
by mst100
if even after bootstrap usage you get

: You need to rebuild the database using -reindex to change -txindex.
Do you want to rebuild the block database now?

do CTRL+C
and
./zettelkastend -reindex

it will took some time till reindex