Skip to content

Commit

Permalink
Merge pull request #30 from z-classic/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
ch4ot1c authored Feb 20, 2018
2 parents 92e430e + 537c593 commit 7ade48e
Show file tree
Hide file tree
Showing 4 changed files with 229 additions and 161 deletions.
24 changes: 24 additions & 0 deletions clean.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
:: some commands found that can be a start for the clean.bat

:: ------------------------------------------------------------------
:: [Niels Buekers] Clean blockchain folders
:: Deletes existing blockchain from user's default
:: installation directory. Should only be used in
:: case of a corrupted chainstate. User will need
:: to redownload entire blockchain if he proceeds.
:: Wallet, peers and config remains untouched.
:: ------------------------------------------------------------------
@echo off
setlocal
:PROMPT
ECHO "This operation will remove your current blockchain."
ECHO "You will need to redownload it completely."
ECHO "Only use this in case of a currupted chainstate."
SET /P AREYOUSURE=Are you sure (Y/[N])?
IF /I "%AREYOUSURE%" NEQ "Y" GOTO END

@RD /S /Q "C:\Users\%USERNAME%\AppData\Roaming\Zclassic\blocks"
@RD /S /Q "C:\Users\%USERNAME%\AppData\Roaming\Zclassic\chainstate"

:END
endlocal
26 changes: 26 additions & 0 deletions clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!bin/sh
# ------------------------------------------------------------------
# [Niels Buekers] Clean blockchain folders
# Deletes existing blockchain from user's default
# installation directory. Should only be used in
# case of a corrupted chainstate. User will need
# to redownload entire blockchain if he proceeds.
# Wallet, peers and config remains untouched.
# ------------------------------------------------------------------

echo "This operation will remove your current blockchain."
echo "You will need to redownload it completely."
echo "Only use this in case of a currupted chainstate."

read -p "Are you sure you want to delete your entire ZCL blockchain? (y/N) " -n 1 -r
echo # (optional) move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]
then
echo "deleting ~/Library/Application Support/Zclassic/blocks"
rm -rf ~/Library/Application Support/Zclassic/blocks
echo "deleting ~/Library/Application Support/Zclassic/chainstate"
rm -rf ~/Library/Application Support/Zclassic/chainstate
echo "success."
else
echo "Aborted."
fi
Loading

0 comments on commit 7ade48e

Please sign in to comment.