URL="https://warden-testnet-rpc.mictonode.com/net_info"
PEERS=$(echo $response | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):" + (.node_info.listen_addr | capture("(?<ip>.+):(?<port>[0-9]+)$").port)' | paste -sd "," -)
sed -i 's|^persistent_peers *=.*|persistent_peers = "'$PEERS'"|' $HOME/.warden/config/config.toml
sudo systemctl daemon-reload
sudo systemctl restart wardend
sudo journalctl -u wardend -f -o cat
➡️ Number of peers to which the node connects
curl -Ss localhost:${W_PORT}57/net_info | jq .result.n_peers
➡️ You can see the details of your peers with this code
curl -sS http://localhost:${W_PORT}57/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr)"' | awk -F ':' '{print $1":"$(NF)}'