diff --git a/README.md b/README.md index 0a34f1a6..f9dddd7b 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/util/test_relay.sh b/util/test_relay.sh new file mode 100644 index 00000000..3706ec11 --- /dev/null +++ b/util/test_relay.sh @@ -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 \ No newline at end of file