added smoll testscript

This commit is contained in:
cventastic
2021-12-16 12:19:39 +01:00
parent 8a2d250915
commit 938dcd95d5
2 changed files with 19 additions and 1 deletions

View File

@@ -18,10 +18,13 @@ POCKET_MAIN_GENESIS=
POCKET_TEST_SEEDS=
POCKET_TEST_GENESIS=
```
!!! I added a simple test-script (util/test_relay.sh) to see if the (geth)chains are synced. Dont try to relay before they are.
To test if relaying chains works, pokt-testnet-service and pokt-mainnet service have to be provided with the following command parameters:
```
command: pocket start --simulateRelay
```
```
# EXAMPLES

15
util/test_relay.sh Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/sh
# Only geth right now
declare -A chain_arr
chain_arr[goerli]="0026"
chain_arr[rinkeby]="0025"
chain_arr[ropsten]="0023"
chain_arr[mainnet]="0021"
for i in ${!chain_arr[@]}; do
echo ${i} ${chain_arr[${i}]}
echo curl -X POST --data '{"relay_network_id":"'${chain_arr[${i}]}'","payload":{"data":"{\"jsonrpc\":\"2.0\",\"method\":\"eth_syncing\",\"params\":[],\"id\":1}","method":"POST","path":"","headers":{}}}' http://127.0.0.1:8081/v1/client/sim
curl -X POST --data '{"relay_network_id":"'${chain_arr[${i}]}'","payload":{"data":"{\"jsonrpc\":\"2.0\",\"method\":\"eth_syncing\",\"params\":[],\"id\":1}","method":"POST","path":"","headers":{}}}' http://127.0.0.1:8081/v1/client/sim
done