From f794cf8de8bed042138a49d834ebb76bbfb6d4f6 Mon Sep 17 00:00:00 2001 From: Abirdcfly Date: Mon, 22 May 2023 18:49:44 +0800 Subject: [PATCH] fix: package cosmosaccount Account.PubKey ignore error (#3487) Signed-off-by: Abirdcfly Co-authored-by: Danilo Pantani --- ignite/pkg/cosmosaccount/cosmosaccount.go | 2 +- ignite/pkg/httpstatuschecker/httpstatuschecker.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ignite/pkg/cosmosaccount/cosmosaccount.go b/ignite/pkg/cosmosaccount/cosmosaccount.go index d575110760..120ad44a89 100644 --- a/ignite/pkg/cosmosaccount/cosmosaccount.go +++ b/ignite/pkg/cosmosaccount/cosmosaccount.go @@ -152,7 +152,7 @@ func (a Account) Address(accPrefix string) (string, error) { func (a Account) PubKey() (string, error) { pk, err := a.Record.GetPubKey() if err != nil { - return "", nil + return "", err } return pk.String(), nil diff --git a/ignite/pkg/httpstatuschecker/httpstatuschecker.go b/ignite/pkg/httpstatuschecker/httpstatuschecker.go index 10362b659d..e41b936c81 100644 --- a/ignite/pkg/httpstatuschecker/httpstatuschecker.go +++ b/ignite/pkg/httpstatuschecker/httpstatuschecker.go @@ -42,6 +42,7 @@ func (c *checker) check(ctx context.Context) (bool, error) { } res, err := c.c.Do(req) if err != nil { + // ignore some errors like "connect: connection refused" return false, nil } defer res.Body.Close()