Skip to content

Commit

Permalink
Merge pull request #247 from InjectiveLabs/feat/add-status-to-tmclient
Browse files Browse the repository at this point in the history
feat: add GetStatus to tmclient
  • Loading branch information
aarmoa authored Sep 30, 2024
2 parents d4e225c + 1ef066b commit bb9ef54
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions client/tm/tmclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ type TendermintClient interface {
GetBlockResults(ctx context.Context, height int64) (*ctypes.ResultBlockResults, error)
GetValidatorSet(ctx context.Context, height int64) (*ctypes.ResultValidators, error)
GetABCIInfo(ctx context.Context) (*ctypes.ResultABCIInfo, error)
GetStatus(ctx context.Context) (*ctypes.ResultStatus, error)
}

type tmClient struct {
Expand Down Expand Up @@ -89,3 +90,8 @@ func (c *tmClient) GetValidatorSet(ctx context.Context, height int64) (*ctypes.R
func (c *tmClient) GetABCIInfo(ctx context.Context) (*ctypes.ResultABCIInfo, error) {
return c.rpcClient.ABCIInfo(ctx)
}

// GetStatus returns the node status.
func (c *tmClient) GetStatus(ctx context.Context) (*ctypes.ResultStatus, error) {
return c.rpcClient.Status(ctx)
}

0 comments on commit bb9ef54

Please sign in to comment.