diff --git a/mempool/reactor.go b/mempool/reactor.go index 2c8b1c2cd..c725a3027 100644 --- a/mempool/reactor.go +++ b/mempool/reactor.go @@ -180,7 +180,7 @@ func (r *Reactor) handleMempoolMessage(envelope p2p.Envelope) error { for _, tx := range protoTxs { if err := r.mempool.CheckTx(types.Tx(tx), nil, txInfo); err != nil { - logger.Error("checktx failed for tx", "tx", txID(tx), "err", err) + logger.Error("checktx failed for tx", "tx", fmt.Sprintf("%X", txID(tx)), "err", err) } } @@ -376,7 +376,7 @@ func (r *Reactor) broadcastTxRoutine(peerID p2p.NodeID, closer *tmsync.Closer) { Txs: [][]byte{memTx.tx}, }, } - r.Logger.Debug("gossiped tx to peer", "tx", txID(memTx.tx), "peer", peerID) + r.Logger.Debug("gossiped tx to peer", "tx", fmt.Sprintf("%X", txID(memTx.tx)), "peer", peerID) } select { diff --git a/rpc/jsonrpc/server/http_json_handler.go b/rpc/jsonrpc/server/http_json_handler.go index 6731384f9..1dd215fe0 100644 --- a/rpc/jsonrpc/server/http_json_handler.go +++ b/rpc/jsonrpc/server/http_json_handler.go @@ -97,8 +97,9 @@ func makeJSONRPCHandler(funcMap map[string]*RPCFunc, logger log.Logger) http.Han } args = append(args, fnArgs...) } + returns := rpcFunc.f.Call(args) - logger.Info("HTTPJSONRPC", "method", request.Method, "args", args, "returns", returns) + result, err := unreflectResult(returns) switch e := err.(type) { // if no error then return a success response @@ -122,6 +123,7 @@ func makeJSONRPCHandler(funcMap map[string]*RPCFunc, logger log.Logger) http.Han } } } + if len(responses) > 0 { WriteRPCResponseHTTP(w, responses...) } diff --git a/rpc/jsonrpc/server/http_server.go b/rpc/jsonrpc/server/http_server.go index 14238bf8a..52d46740b 100644 --- a/rpc/jsonrpc/server/http_server.go +++ b/rpc/jsonrpc/server/http_server.go @@ -221,9 +221,11 @@ func RecoverAndLogHandler(handler http.Handler, logger log.Logger) http.Handler if rww.Status == -1 { rww.Status = 200 } - logger.Info("Served RPC HTTP response", - "method", r.Method, "url", r.URL, - "status", rww.Status, "duration", durationMS, + logger.Debug("served RPC HTTP response", + "method", r.Method, + "url", r.URL, + "status", rww.Status, + "duration", durationMS, "remoteAddr", r.RemoteAddr, ) }() diff --git a/test/e2e/runner/rpc.go b/test/e2e/runner/rpc.go index da94bd911..f526e00d0 100644 --- a/test/e2e/runner/rpc.go +++ b/test/e2e/runner/rpc.go @@ -92,18 +92,22 @@ func waitForNode(node *e2e.Node, height int64, timeout time.Duration) (*rpctypes // waitForAllNodes waits for all nodes to become available and catch up to the given block height. func waitForAllNodes(testnet *e2e.Testnet, height int64, timeout time.Duration) (int64, error) { - lastHeight := int64(0) + var lastHeight int64 + for _, node := range testnet.Nodes { if node.Mode == e2e.ModeSeed { continue } + status, err := waitForNode(node, height, timeout) if err != nil { return 0, err } + if status.SyncInfo.LatestBlockHeight > lastHeight { lastHeight = status.SyncInfo.LatestBlockHeight } } + return lastHeight, nil }