diff --git a/relayer/client.go b/relayer/client.go index 763bfa60b..c570959bf 100644 --- a/relayer/client.go +++ b/relayer/client.go @@ -532,6 +532,7 @@ type ClientStateInfo struct { ChainID string TrustingPeriod time.Duration LatestHeight ibcexported.Height + UnbondingTime time.Duration } func ClientInfoFromClientState(clientState *codectypes.Any) (ClientStateInfo, error) { @@ -546,6 +547,7 @@ func ClientInfoFromClientState(clientState *codectypes.Any) (ClientStateInfo, er ChainID: t.ChainId, TrustingPeriod: t.TrustingPeriod, LatestHeight: t.LatestHeight, + UnbondingTime: t.UnbondingPeriod, }, nil default: return ClientStateInfo{}, fmt.Errorf("unhandled client state type: (%T)", clientState) diff --git a/relayer/query.go b/relayer/query.go index fa59dba14..087705526 100644 --- a/relayer/query.go +++ b/relayer/query.go @@ -316,8 +316,9 @@ func SPrintClientExpiration(chain *Chain, expiration time.Time, clientInfo Clien TIME: %s (%s) LAST UPDATE HEIGHT: %d TRUSTING PERIOD: %s + UNBONDING PERIOD: %s `, - chain.ClientID(), chain.ChainID(), status, expirationFormatted, remainingTime.Round(time.Second), clientInfo.LatestHeight.GetRevisionHeight(), clientInfo.TrustingPeriod.String()) + chain.ClientID(), chain.ChainID(), status, expirationFormatted, remainingTime.Round(time.Second), clientInfo.LatestHeight.GetRevisionHeight(), clientInfo.TrustingPeriod.String(), clientInfo.UnbondingTime.Round(time.Second)) return legacyOutput @@ -342,6 +343,7 @@ func SPrintClientExpirationJson(chain *Chain, expiration time.Time, clientInfo C "TIME": fmt.Sprintf("%s (%s)", expirationFormatted, remainingTime.Round(time.Second)), "LAST UPDATE HEIGHT": strconv.FormatUint(clientInfo.LatestHeight.GetRevisionHeight(), 10), "TRUSTING PERIOD": clientInfo.TrustingPeriod.String(), + "UNBONDING PERIOD": fmt.Sprint(clientInfo.UnbondingTime.Round(time.Second)), } jsonOutput, err := json.Marshal(data)