From 93317fbb29d0f9ad85b3a78eb61c963fad6d9742 Mon Sep 17 00:00:00 2001
From: Sonic <sonic@dexon.org>
Date: Tue, 20 Nov 2018 15:32:21 +0800
Subject: test: add script to run sync node

---
 test/sync_test.sh | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100755 test/sync_test.sh

diff --git a/test/sync_test.sh b/test/sync_test.sh
new file mode 100755
index 000000000..702cc1e32
--- /dev/null
+++ b/test/sync_test.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+GDEX=../build/bin/gdex
+
+logsdir=$PWD/sync-log
+rm -rf $logsdir
+mkdir $logsdir
+
+# A standalone RPC server for accepting RPC requests.
+for i in $(seq 0 3); do
+  datadir=$PWD/Dexon.sync.$i
+  rm -rf $datadir
+  $GDEX --datadir=$datadir init genesis.json
+  $GDEX --testnet --verbosity=4 --gcmode=archive --datadir=$datadir \
+    --rpc --rpcapi=eth,net,web3,debug --rpcaddr=0.0.0.0 \
+    --port=$((30505 + $i)) \
+    --rpcport=$((8663 + $i *2)) \
+    --wsport=$((8664 + $i * 2))  \
+    --ws --wsapi=eth,net,web3,debug --wsaddr=0.0.0.0 \
+    --wsorigins='*' --rpcvhosts='*' --rpccorsdomain="*" \
+    > $logsdir/gdex.sync.$i.log 2>&1 &
+done
+
+tail -f $logsdir/gdex.*.log
-- 
cgit v1.2.3