preserve testnets data between system restarts
This commit is contained in:
parent
7d0243b2ba
commit
987295e8e4
|
@ -8,8 +8,8 @@ data/
|
|||
demo/validator*/db
|
||||
demo/validator*/keys
|
||||
demo/validator*/queue
|
||||
demo/ganache_data/
|
||||
demo/ganache_data_side/
|
||||
demo/ganache_home
|
||||
demo/ganache_side
|
||||
src/deploy/deploy-home/build/
|
||||
src/deploy/deploy-side/build/
|
||||
src/deploy/deploy-test/build/
|
||||
|
|
|
@ -4,11 +4,14 @@ set -e
|
|||
|
||||
cd $(dirname "$0")
|
||||
|
||||
rm -rf ganache_side_db
|
||||
rm -rf ganache_home_db
|
||||
|
||||
for (( I = 1; I < 4; ++I )); do
|
||||
DIRNAME="validator$I"
|
||||
rm -r "$DIRNAME/db"
|
||||
rm -r "$DIRNAME/queue"
|
||||
rm -r "$DIRNAME/keys"
|
||||
rm -rf "$DIRNAME/db"
|
||||
rm -rf "$DIRNAME/queue"
|
||||
rm -rf "$DIRNAME/keys"
|
||||
mkdir "$DIRNAME/db"
|
||||
mkdir "$DIRNAME/queue"
|
||||
mkdir "$DIRNAME/keys"
|
||||
|
|
|
@ -6,15 +6,29 @@ cd $(dirname "$0")
|
|||
|
||||
echo "Starting side test blockchain"
|
||||
|
||||
mntpoint=`pwd`/ganache_side_db
|
||||
if [ ! -d ${mntpoint} ]; then
|
||||
mkdir ${mntpoint}
|
||||
fi
|
||||
|
||||
docker kill ganache_side > /dev/null 2>&1 || true
|
||||
docker network create blockchain_side > /dev/null 2>&1 || true
|
||||
docker run -d --network blockchain_side --rm --name ganache_side trufflesuite/ganache-cli:latest -m "shrug dwarf easily blade trigger lucky reopen cage lake scatter desk boat" -i 33 -q
|
||||
docker run -d --network blockchain_side --rm --name ganache_side -v ${mntpoint}:/app/db \
|
||||
trufflesuite/ganache-cli:latest \
|
||||
-m "shrug dwarf easily blade trigger lucky reopen cage lake scatter desk boat" -i 33 -q --db /app/db
|
||||
|
||||
echo "Starting home test blockchain"
|
||||
|
||||
mntpoint=`pwd`/ganache_home_db
|
||||
if [ ! -d ${mntpoint} ]; then
|
||||
mkdir ${mntpoint}
|
||||
fi
|
||||
|
||||
docker kill ganache_home > /dev/null 2>&1 || true
|
||||
docker network create blockchain_home > /dev/null 2>&1 || true
|
||||
docker run -d --network blockchain_home --rm --name ganache_home trufflesuite/ganache-cli:latest -m "shrug dwarf easily blade trigger lucky reopen cage lake scatter desk boat" -i 44 -q
|
||||
docker run -d --network blockchain_home --rm --name ganache_home -v ${mntpoint}:/app/db \
|
||||
trufflesuite/ganache-cli:latest \
|
||||
-m "shrug dwarf easily blade trigger lucky reopen cage lake scatter desk boat" -i 44 -q --db /app/db
|
||||
|
||||
sleep 4
|
||||
|
||||
|
|
Loading…
Reference in New Issue