forked from ainblockchain/ain-blockchain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
start_servers_afan.sh
executable file
·17 lines (15 loc) · 963 Bytes
/
start_servers_afan.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
rm -rf blockchain/blockchains logger/log
# PARENT CHAIN
node ./tracker-server/index.js &
sleep 5
NUM_VALIDATORS=3 ACCOUNT_INDEX=0 HOSTING_ENV=local node ./client/index.js &
NUM_VALIDATORS=3 ACCOUNT_INDEX=1 HOSTING_ENV=local node ./client/index.js &
NUM_VALIDATORS=3 ACCOUNT_INDEX=2 HOSTING_ENV=local node ./client/index.js &
sleep 10
# AFAN CHILD CHAIN
PORT=9010 P2P_PORT=6010 node ./tracker-server/index.js &
sleep 10
PORT=9011 P2P_PORT=6011 TRACKER_WS_ADDR=ws://localhost:6010 NUM_VALIDATORS=3 ACCOUNT_INDEX=0 HOSTING_ENV=local GENESIS_CONFIGS_DIR=blockchain/afan_shard node ./client/index.js &
PORT=9012 P2P_PORT=6012 TRACKER_WS_ADDR=ws://localhost:6010 NUM_VALIDATORS=3 ACCOUNT_INDEX=1 HOSTING_ENV=local GENESIS_CONFIGS_DIR=blockchain/afan_shard node ./client/index.js &
PORT=9013 P2P_PORT=6013 TRACKER_WS_ADDR=ws://localhost:6010 NUM_VALIDATORS=3 ACCOUNT_INDEX=2 HOSTING_ENV=local GENESIS_CONFIGS_DIR=blockchain/afan_shard node ./client/index.js &
sleep 10