* limit context background * update * fixed minor issues * fixed TestStatusCommand * Fix keyring import from older versions. (#8436) Co-authored-by: Alessio Treglia <alessio@tendermint.com> Co-authored-by: sahith-narahari <sahithnarahari@gmail.com> * Add changelog (#8490) * fix: tendermint subcommands should not create missing files (#8481) If the user specifies an incorrect `--home`, then the old behaviour would automatically populate it with fresh values, but we should fail instead. * limit context background * update * fixed minor issues * fixed TestStatusCommand * statik.go * replaced static.go Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com> Co-authored-by: Alessio Treglia <alessio@tendermint.com> Co-authored-by: sahith-narahari <sahithnarahari@gmail.com> Co-authored-by: Michael FIG <mfig@agoric.com>
20 lines
372 B
Go
20 lines
372 B
Go
package tmservice
|
|
|
|
import (
|
|
"context"
|
|
|
|
ctypes "github.com/tendermint/tendermint/rpc/core/types"
|
|
|
|
"github.com/cosmos/cosmos-sdk/client"
|
|
)
|
|
|
|
func getBlock(ctx context.Context, clientCtx client.Context, height *int64) (*ctypes.ResultBlock, error) {
|
|
// get the node
|
|
node, err := clientCtx.GetNode()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return node.Block(ctx, height)
|
|
}
|