Better UX; Don't delete testnet data folders
This commit is contained in:
parent
b9e653f7fd
commit
96ac81c89f
|
@ -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(
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue