aboutsummaryrefslogtreecommitdiffstats
path: root/test/run_test.sh
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2018-11-15 13:30:50 +0800
committerWei-Ning Huang <w@dexon.org>2019-04-09 21:32:53 +0800
commitb26e4c9adaa2952a63bf811f991a3e6fb9fc5646 (patch)
tree84f78ba24e34b4ae6bca777fd6edc659bb16feb9 /test/run_test.sh
parent426fdd07f71aea7de2fe8ca010f17afaf774c047 (diff)
downloaddexon-b26e4c9adaa2952a63bf811f991a3e6fb9fc5646.tar
dexon-b26e4c9adaa2952a63bf811f991a3e6fb9fc5646.tar.gz
dexon-b26e4c9adaa2952a63bf811f991a3e6fb9fc5646.tar.bz2
dexon-b26e4c9adaa2952a63bf811f991a3e6fb9fc5646.tar.lz
dexon-b26e4c9adaa2952a63bf811f991a3e6fb9fc5646.tar.xz
dexon-b26e4c9adaa2952a63bf811f991a3e6fb9fc5646.tar.zst
dexon-b26e4c9adaa2952a63bf811f991a3e6fb9fc5646.zip
core: refactor validator and fix light node sync (#25)
Remove custom Dexon validator by adding a new `ValidateWitnessData` method into the validator interface. This allow us to properly detect know blocks. This also allow other gdex "light" client to sync compaction chain. Also, setup a standalone RPC node for handling RPC reqeusts.
Diffstat (limited to 'test/run_test.sh')
-rwxr-xr-xtest/run_test.sh26
1 files changed, 16 insertions, 10 deletions
diff --git a/test/run_test.sh b/test/run_test.sh
index a7dd934bc..f535a609d 100755
--- a/test/run_test.sh
+++ b/test/run_test.sh
@@ -15,14 +15,20 @@ rm -f log-latest
ln -s $logsdir log-latest
# A standalone RPC server for accepting RPC requests.
-# datadir=$PWD/Dexon.rpc
-# rm -rf $datadir
-# $GDEX --datadir=$datadir init genesis.json
-# $GDEX --verbosity=4 --gcmode=archive --datadir=$datadir \
-# --rpc --rpcapi=eth,net,web3,debug --rpcaddr=0.0.0.0 --rpcport=8543 \
-# --ws --wsapi=eth,net,web3,debug --wsaddr=0.0.0.0 --wsport=8544 \
-# --wsorigins='*' --rpcvhosts='*' --rpccorsdomain="*" \
-# > $logsdir/gdex.rpc.log 2>&1 &
+datadir=$PWD/Dexon.rpc
+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 --rpcport=8545 \
+ --ws --wsapi=eth,net,web3,debug \
+ --wsaddr=0.0.0.0 --wsport=8546 \
+ --wsorigins='*' --rpcvhosts='*' --rpccorsdomain="*" \
+ > $logsdir/gdex.rpc.log 2>&1 &
# Nodes
for i in $(seq 0 3); do
@@ -37,9 +43,9 @@ for i in $(seq 0 3); do
--datadir=$datadir --nodekey=test$i.nodekey \
--port=$((30305 + $i)) \
--rpc --rpcapi=eth,net,web3,debug \
- --rpcaddr=0.0.0.0 --rpcport=$((8545 + $i * 2)) \
+ --rpcaddr=0.0.0.0 --rpcport=$((8547 + $i * 2)) \
--ws --wsapi=eth,net,web3,debug \
- --wsaddr=0.0.0.0 --wsport=$((8546 + $i * 2)) \
+ --wsaddr=0.0.0.0 --wsport=$((8548 + $i * 2)) \
--wsorigins='*' --rpcvhosts='*' --rpccorsdomain="*" \
--pprof --pprofaddr=localhost --pprofport=$((6060 + $i)) \
> $logsdir/gdex.$i.log 2>&1 &