From 461755b10efed62a2a0b663f831f1c8ab109ab46 Mon Sep 17 00:00:00 2001 From: Abirdcfly Date: Tue, 25 Apr 2023 14:32:55 +0800 Subject: [PATCH] fix: package cosmosaccount Account.PubKey ignore error Signed-off-by: Abirdcfly --- 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()