Better UX; Don't delete testnet data folders

This commit is contained in:
Zahary Karadjov 2020-06-28 23:22:23 +03:00 committed by zah
parent b9e653f7fd
commit 96ac81c89f
2 changed files with 1 additions and 14 deletions

View File

@ -414,7 +414,7 @@ method onBlockHeaders*(p: Web3DataProviderRef,
if p.blockHeadersSubscription != nil:
await p.blockHeadersSubscription.unsubscribe()
debug "Subscribing for block headers"
info "Waiting for new Eth1 block headers"
let options = newJObject()
p.blockHeadersSubscription = await p.web3.subscribeForBlockHeaders(

View File

@ -242,19 +242,6 @@ cli do (skipGoerliKey {.
if system.fileExists(depositContractBlockFile):
depositContractOpt.add " --deposit-contract-block=" & readFile(depositContractBlockFile).strip
if system.dirExists(dataDir):
block resetDataDir:
# We reset the testnet data dir if the existing data dir is
# incomplete (it misses a genesis file) or if it has a genesis
# file from an older testnet:
if system.fileExists(dataDir/genesisFile):
let localGenesisContent = readFile(dataDir/genesisFile)
let testnetGenesisContent = readFile(testnetDir/genesisFile)
if localGenesisContent == testnetGenesisContent:
break
echo "Detected testnet restart. Deleting previous database..."
rmDir dataDir
cd rootDir
mkDir dataDir