Skip to content

Commit

Permalink
update scripts and peer ndoes
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickwieth committed Oct 17, 2023
1 parent b6752fb commit 6563565
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
5 changes: 3 additions & 2 deletions peer_nodes.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
{
"rpcs": [
"http://crowd.rpc.t.stavr.tech:21207",
"https://cardchain-testnet-rpc.itrocket.net",
"http://crowd.rpc.t.stavr.tech:21207",
"https://rpc-testnet-cardchain.nodeist.net"
],
"peers": [
"crowd.peer.stavr.tech:21206",
"cardchain-testnet-peer.itrocket.net:31656",
"crowd.peer.stavr.tech:21206",
"rpc-testnet-cardchain.nodeist.net:26656"
],
"snap_rpcs": [
"https://cardchain-testnet-rpc.itrocket.net:443",
"http://crowd.rpc.t.stavr.tech:21207",
"https://rpc-testnet-cardchain.nodeist.net:443"
]
Expand Down
2 changes: 1 addition & 1 deletion scripts/buildlaunch-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )

cd "$parent_path"

docker-compose build
docker-compose build --no-cache
docker-compose up -d
sleep 1
bash register_faucet.sh
23 changes: 22 additions & 1 deletion scripts/register_faucet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,25 @@ parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )

cd "$parent_path"

Cardchaind tx cardchain createuser $(cat ../backup/faucetaddress.txt) faucet --from jannik --gas auto --node tcp://$(cat ../syncnode.txt):26657
mapfile -t rpcs < <(
jq -r '.rpcs[]' peer_nodes.json
)

for i in "${!rpcs[@]}"; do
if curl --output /dev/null --silent --head --fail --connect-timeout 5 ${rpcs[$i]}; then
echo "URL exists: ${rpcs[$i]}"
RPC=${rpcs[$i]}


break
else
echo "not reachable $i"
fi
done
if [ -z "$PEERS" ]
then
echo -e "\033[0;31mNo PEERS available\033[0m"
exit
fi

Cardchaind tx cardchain createuser $(cat ../backup/faucetaddress.txt) faucet --from jannik --gas auto --node tcp://$RPC:26657

0 comments on commit 6563565

Please sign in to comment.