From ad4d4efb873f92186eba2810ff352191e1628f18 Mon Sep 17 00:00:00 2001 From: Alex Gartner Date: Wed, 11 Dec 2024 09:05:32 -0800 Subject: [PATCH] review updates --- cmd/zetae2e/get_zetaclient_bootstrap.go | 6 +++--- contrib/localnet/scripts/start-zetaclientd.sh | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cmd/zetae2e/get_zetaclient_bootstrap.go b/cmd/zetae2e/get_zetaclient_bootstrap.go index 2919c41b06..5821286481 100644 --- a/cmd/zetae2e/get_zetaclient_bootstrap.go +++ b/cmd/zetae2e/get_zetaclient_bootstrap.go @@ -65,9 +65,9 @@ func getZetaclientBootstrap(cmd *cobra.Command, _ []string) error { // in localnet, moniker is also the hostname moniker := validatorRes.Validator.Description.Moniker - peerId, err := conversion.Bech32PubkeyToPeerID(account.GranteePubkey.Secp256k1.String()) + peerID, err := conversion.Bech32PubkeyToPeerID(account.GranteePubkey.Secp256k1.String()) if err != nil { - return fmt.Errorf("conferting pubkey to peerid: %w", err) + return fmt.Errorf("converting pubkey to peerID: %w", err) } zetaclientHostname := strings.ReplaceAll(moniker, "zetacore", "zetaclient") @@ -90,7 +90,7 @@ func getZetaclientBootstrap(cmd *cobra.Command, _ []string) error { if ipv4Address == "" { return fmt.Errorf("no IPv4 address found for hostname %s", zetaclientHostname) } - fmt.Printf("/ip4/%s/tcp/6668/p2p/%s\n", ipv4Address, peerId.String()) + fmt.Printf("/ip4/%s/tcp/6668/p2p/%s\n", ipv4Address, peerID.String()) } return nil diff --git a/contrib/localnet/scripts/start-zetaclientd.sh b/contrib/localnet/scripts/start-zetaclientd.sh index 6e909631af..fd4c55249b 100755 --- a/contrib/localnet/scripts/start-zetaclientd.sh +++ b/contrib/localnet/scripts/start-zetaclientd.sh @@ -71,11 +71,12 @@ mkdir -p "${RELAYER_KEY_PATH}" mkdir -p "$HOME/.tss/" zetae2e get-zetaclient-bootstrap > "$HOME/.tss/address_book.seed" +MYIP=$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) + echo "Start zetaclientd" # skip initialization if the config file already exists (zetaclientd init has already been run) if [[ $HOSTNAME == "zetaclient0" && ! -f ~/.zetacored/config/zetaclient_config.json ]] then - MYIP=$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) zetaclientd init --zetacore-url zetacore0 --chain-id athens_101-1 --operator "$operatorAddress" --log-format=text --public-ip "$MYIP" --keyring-backend "$BACKEND" --pre-params "$PREPARAMS_PATH" # import relayer private key for zetaclient0