Skip to content

Commit

Permalink
Fix add_observer
Browse files Browse the repository at this point in the history
  • Loading branch information
askolesov committed Nov 11, 2021
1 parent 07fad9c commit 177a8f4
Showing 1 changed file with 20 additions and 12 deletions.
32 changes: 20 additions & 12 deletions tests/networks/docker_compose/add_observer.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
#!/bin/bash
sudo chmod -R 777 /etc/cheqd-node
sudo chmod -R 777 /var/lib/cheqd/data
cd

set -euox pipefail


cheqd-noded init node5
NODE0_IP="127.0.0.1"
PEER0=$(cat ${NODE_CONFIGS_BASE}/node0/node_id.txt)@$NODE0_IP:26656
sed -ri "s|peers = \".*\"|peers = \"${PEER0}\"|" ~/.cheqdnode/config/config.toml
sed -ri "s|laddr = \"tcp://127.0.0.1:26657\"|laddr = \"tcp://127.0.0.1:26677\"|" ~/.cheqdnode/config/config.toml
sed -ri "s|laddr = \"tcp://0.0.0.0:26656\"|laddr = \"tcp://0.0.0.0:26676\"|" ~/.cheqdnode/config/config.toml

NODE0_ID=$(cat "${NODE_CONFIGS_BASE}/node0/node_id.txt")
NODE0_PEER_INFO="${NODE0_ID}@127.0.0.1:26656"

cheqd-noded configure p2p persistent-peers "${NODE0_PEER_INFO}"
#cheqd-noded configure p2p laddr "tcp://0.0.0.0:26676"
sed -ri "s|laddr = \"tcp://0.0.0.0:26656\"|laddr = \"tcp://0.0.0.0:26676\"|" "$HOME/.cheqdnode/config/config.toml"
cheqd-noded configure rpc-laddr "tcp://127.0.0.1:26677"

# cp ~/.cheqdnode/config/* /etc/cheqd-node/ # /var/lib/cheqd/.cheqdnode/config -> /etc/cheqd-node/
# cp ~/.cheqdnode/data/* /var/lib/cheqd/data/ # /var/lib/cheqd/.cheqdnode/data -> /var/lib/cheqd/data
cp ${NODE_CONFIGS_BASE}/node0/.cheqdnode/config/genesis.json ~/.cheqdnode/config/
sudo chmod -R 777 /etc/cheqd-node
sudo chmod -R 777 /var/lib/cheqd/data

cp "${NODE_CONFIGS_BASE}/node0/.cheqdnode/config/genesis.json" "$HOME/.cheqdnode/config/"

#sudo chmod -R 777 /etc/cheqd-node
#sudo chmod -R 777 /var/lib/cheqd/data

sudo systemctl start cheqd-noded
systemctl status cheqd-noded
systemctl status cheqd-noded

0 comments on commit 177a8f4

Please # to comment.