Skip to content

Commit

Permalink
review updates
Browse files Browse the repository at this point in the history
  • Loading branch information
gartnera committed Dec 11, 2024
1 parent 96786f0 commit ad4d4ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions cmd/zetae2e/get_zetaclient_bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion contrib/localnet/scripts/start-zetaclientd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ad4d4ef

Please sign in to comment.