#!/bin/bash

set -e

N=${1:-2}

cd  mainchain
./scripts/stop-testnet.sh || true 
rm -rf conf/deploy || true 

echo "./mainchain/scripts/run-testnet.sh "
cp -r  conf/back0712-1439  conf/deploy 

echo "./mainchain/scripts/run-testnet.sh "
./scripts/run-testnet.sh 

cd ../


./ring.sh $N
./cadvisor.sh $N
./cryptor.sh  $N
./net.sh $N
./nebula.sh $N

