Skip to content

Commit

Permalink
Switching network to minows
Browse files Browse the repository at this point in the history
  • Loading branch information
XioZ committed May 30, 2024
1 parent 482c4a8 commit 0eec57d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/local_proxies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,15 @@ SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)

echo "adding proxies"

CLI_BIN=./bin/dvoting-libp2p
echo "CLI_BIN: $CLI_BIN"

for node in $(seq 0 3); do
NodeAddr="/ip4/127.0.0.1/tcp/$((2000 + node * 2))/ws"
NODEDIR=./nodes/node-$((node+1))
NodeAddr=$(LLVL=warn $CLI_BIN --config $NODEDIR list address)
echo "NodeAddr: $NodeAddr"
ProxyAddr="http://localhost:$((2001 + node * 2))"
echo "ProxyAddr: $ProxyAddr"
echo -n "Adding proxy for node $((node + 1)): "
curl -sk "$FRONTEND_URL/api/proxies/" -X POST -H 'Content-Type: application/json' -b cookies.txt \
--data-raw "{\"NodeAddr\":\"$NodeAddr\",\"Proxy\":\"$ProxyAddr\"}"
Expand Down

0 comments on commit 0eec57d

Please sign in to comment.