* WIP * WIP setup * WIP setup testsuite * add node_info * add GetLatestBlock,GetBlockByHeight grpc endpoints * add GetValidatorSetByHeight, GetLatestValidatorSet * fix lint * fix tests * proto format * Update Makefile * review changes * Makefile format * handle nil pagination * rename query.go to service.go * format Makefile * format Makefile * review changes * review changes Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
18 lines
353 B
Go
18 lines
353 B
Go
package tmservice
|
|
|
|
import (
|
|
"context"
|
|
|
|
ctypes "github.com/tendermint/tendermint/rpc/core/types"
|
|
|
|
"github.com/cosmos/cosmos-sdk/client"
|
|
)
|
|
|
|
func getNodeStatus(clientCtx client.Context) (*ctypes.ResultStatus, error) {
|
|
node, err := clientCtx.GetNode()
|
|
if err != nil {
|
|
return &ctypes.ResultStatus{}, err
|
|
}
|
|
return node.Status(context.Background())
|
|
}
|