From 481f917b169074e85159aa248fb0089f8e801982 Mon Sep 17 00:00:00 2001 From: Jay Jie Date: Sat, 16 Sep 2023 23:17:49 -0700 Subject: [PATCH] fix: only error when validator set is empty due to rpc error --- rest/rest.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest/rest.go b/rest/rest.go index 81a350e..fae5aad 100644 --- a/rest/rest.go +++ b/rest/rest.go @@ -81,7 +81,7 @@ func GetData(cfg *config.Config, blockHeight int64, blockData Blocks, denom stri rd.getValidator(*cfg) // TO-DO if consumer chain, use cosmoshub's ConsPubKey valMap, found := rd.Validatorsets[rd.Validator.ConsPubKey.Key] - if !found { + if len(rd.Validatorsets) != 0 && !found { zap.L().Fatal("", zap.Bool("Success", false), zap.String("err", "Validator not found in the active set")) }