diff options
author | Wei-Ning Huang <w@dexon.org> | 2018-11-03 15:28:45 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-12 17:27:17 +0800 |
commit | 43b14136118d600f14a4ae706557fa14401047d2 (patch) | |
tree | 9595f648b2b369913d828023b458c152c7e76d33 /test | |
parent | d7f599a14d89e7ce1e9f2ab44a01e0d63c428f26 (diff) | |
download | go-tangerine-43b14136118d600f14a4ae706557fa14401047d2.tar go-tangerine-43b14136118d600f14a4ae706557fa14401047d2.tar.gz go-tangerine-43b14136118d600f14a4ae706557fa14401047d2.tar.bz2 go-tangerine-43b14136118d600f14a4ae706557fa14401047d2.tar.lz go-tangerine-43b14136118d600f14a4ae706557fa14401047d2.tar.xz go-tangerine-43b14136118d600f14a4ae706557fa14401047d2.tar.zst go-tangerine-43b14136118d600f14a4ae706557fa14401047d2.zip |
test: start a separate RPC node for testing block sync
Diffstat (limited to 'test')
-rwxr-xr-x | test/run_test.sh | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/test/run_test.sh b/test/run_test.sh index 91742ca4b..c07da0f8e 100755 --- a/test/run_test.sh +++ b/test/run_test.sh @@ -2,18 +2,43 @@ GDEX=../build/bin/gdex +# Kill all previous instances. pkill -9 -f gdex +# Start bootnode. bootnode -nodekey bootnode.key --verbosity=9 > bootnode.log 2>&1 & logsdir=$PWD/log-$(date '+%Y-%m-%d-%H:%M:%S') mkdir $logsdir +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 & + +# Nodes for i in $(seq 0 3); do datadir=$PWD/Dexon.$i rm -rf $datadir $GDEX --datadir=$datadir init genesis.json - $GDEX --verbosity=4 --gcmode=archive --datadir=$datadir --nodekey=test$i.nodekey --port=$((28000 + $i)) --rpc --rpcaddr=0.0.0.0 --rpcport=$((8545 + $i * 2)) --rpcapi=eth,net,web3,debug --ws --wsapi=eth,net,web3,debug --wsaddr=0.0.0.0 --wsport=$((8546 + $i * 2)) --wsorigins='*' --rpcvhosts='*' --rpccorsdomain="*" > $logsdir/gdex.$i.log 2>&1 & + $GDEX --verbosity=4 --gcmode=archive \ + --bp \ + --datadir=$datadir --nodekey=test$i.nodekey \ + --port=$((30305 + $i)) \ + --rpc --rpcapi=eth,net,web3,debug \ + --rpcaddr=0.0.0.0 --rpcport=$((8545 + $i * 2)) \ + --ws --wsapi=eth,net,web3,debug \ + --wsaddr=0.0.0.0 --wsport=$((8546 + $i * 2)) \ + --wsorigins='*' --rpcvhosts='*' --rpccorsdomain="*" \ + > $logsdir/gdex.$i.log 2>&1 & done tail -f $logsdir/gdex.*.log |