0g-chain/tests/e2e/generated/kava-1/config/init-data-directory.sh
Robert Pirtle ff5b0e814e
add initial E2E testing setup (#1475)
* setup e2e test that starts kava chain

* refactor into a testify suite

* setup ethClient

* add example test checking chain id

* cleanup

* refactor & support funded accounts with txs

* ignore e2e tests in CI & consolidate makefiles

* remove circular go.mod dependency

vendors `signing` and `grpc` packages from `kava-labs/go-tools` to
refrain from a circular dep and fix pulled in dep versions

* add min fee for evm side

* prune nothing in e2e node
2023-02-22 15:40:56 -08:00

17 lines
538 B
Bash
Executable File

#! /bin/sh
set -e
# This script creates a data directory if one doesn't exist.
# It's designed to run before the chain starts to properly initialize the data directory in case `kvd init` was not run.
# This behaviour should probably live in tendermint.
configDir=$HOME/.kava/config
dataDir=$HOME/.kava/data
valStateFile=$dataDir/priv_validator_state.json
if ! test -f "$valStateFile"; then
echo "$valStateFile doesn't exist, creating it"
mkdir -p $dataDir
cp $configDir/priv_validator_state.json.example "$valStateFile"
fi