From 8fe698f6f7b8c306bac75afff6daaef868c39390 Mon Sep 17 00:00:00 2001 From: sanaz Date: Wed, 9 Oct 2024 11:36:55 -0700 Subject: [PATCH] converts height ptr to int64 --- rpc/client/http/http.go | 4 ++-- rpc/client/interface.go | 2 +- rpc/core/consensus.go | 4 ++-- rpc/jsonrpc/server/http_server.go | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/rpc/client/http/http.go b/rpc/client/http/http.go index 0fc0af32a8..70a8f17b87 100644 --- a/rpc/client/http/http.go +++ b/rpc/client/http/http.go @@ -389,9 +389,9 @@ func (c *baseRPCClient) BlockchainInfo( return result, nil } -func (c *baseRPCClient) ConsensusTimeoutsInfo(ctx context.Context, heightPtr int64) (*abci.TimeoutsInfo, error) { +func (c *baseRPCClient) ConsensusTimeoutsInfo(ctx context.Context, height int64) (*abci.TimeoutsInfo, error) { result := new(abci.TimeoutsInfo) - _, err := c.caller.Call(ctx, "timeout", map[string]interface{}{"height": heightPtr}, result) + _, err := c.caller.Call(ctx, "timeout", map[string]interface{}{"height": height}, result) if err != nil { return nil, err } diff --git a/rpc/client/interface.go b/rpc/client/interface.go index c5bee96201..3f97dc09e9 100644 --- a/rpc/client/interface.go +++ b/rpc/client/interface.go @@ -7,7 +7,7 @@ to a CometBFT node, as well as higher-level functionality. The main implementation for production code is client.HTTP, which connects via http to the jsonrpc interface of the CometBFT node. -For connecting to a node running in the same process (eg. when +For connecting to a node running in the same process (e.g., when compiling the abci app in the same process), you can use the client.Local implementation. diff --git a/rpc/core/consensus.go b/rpc/core/consensus.go index 2d6f4ec2f1..ae60b0bb80 100644 --- a/rpc/core/consensus.go +++ b/rpc/core/consensus.go @@ -89,8 +89,8 @@ func ConsensusState(ctx *rpctypes.Context) (*ctypes.ResultConsensusState, error) } func ConsensusTimeoutsInfo(ctx *rpctypes.Context, - heightPtr *int64) (*abci.TimeoutsInfo, error) { - return GetEnvironment().StateStore.LoadConsensusTimeoutsInfo(*heightPtr) + heightPtr int64) (*abci.TimeoutsInfo, error) { + return GetEnvironment().StateStore.LoadConsensusTimeoutsInfo(heightPtr) } // ConsensusParams gets the consensus parameters at the given block height. diff --git a/rpc/jsonrpc/server/http_server.go b/rpc/jsonrpc/server/http_server.go index 29eae9fc32..bdd757e7e8 100644 --- a/rpc/jsonrpc/server/http_server.go +++ b/rpc/jsonrpc/server/http_server.go @@ -19,7 +19,7 @@ import ( types "github.com/tendermint/tendermint/rpc/jsonrpc/types" ) -// Config is a RPC server configuration. +// Config is an RPC server configuration. type Config struct { // see netutil.LimitListener MaxOpenConnections int @@ -64,7 +64,7 @@ func Serve(listener net.Listener, handler http.Handler, logger log.Logger, confi return err } -// Serve creates a http.Server and calls ServeTLS with the given listener, +// ServeTLS creates a http.Server and calls ServeTLS with the given listener, // certFile and keyFile. It wraps handler with RecoverAndLogHandler and a // handler, which limits the max body size to config.MaxBodyBytes. //