mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-27 19:37:08 +00:00
lint fixes
This commit is contained in:
@@ -19,7 +19,7 @@ import (
|
||||
// InspectCmd is the command for starting an inspect server.
|
||||
var InspectCmd = &cobra.Command{
|
||||
Use: "inspect",
|
||||
Short: "Run an inspect server for investigating Tendermint state.",
|
||||
Short: "Run an inspect server for investigating Tendermint state",
|
||||
Long: `
|
||||
inspect runs a subset of Tendermint's RPC endpoints that are useful for debugging
|
||||
issues with Tendermint.
|
||||
|
||||
+24
-16
@@ -83,8 +83,9 @@ func TestBlock(t *testing.T) {
|
||||
defer wg.Done()
|
||||
require.NoError(t, d.Run(ctx))
|
||||
}()
|
||||
// force context switch
|
||||
time.Sleep(10 * time.Millisecond)
|
||||
// FIXME: used to induce context switch.
|
||||
// Determine more deterministic method for prompting a context switch
|
||||
time.Sleep(time.Microsecond)
|
||||
requireConnect(t, rpcConfig.ListenAddress, 15)
|
||||
cli, err := httpclient.New(rpcConfig.ListenAddress)
|
||||
require.NoError(t, err)
|
||||
@@ -208,8 +209,9 @@ func TestConsensusParams(t *testing.T) {
|
||||
defer wg.Done()
|
||||
require.NoError(t, d.Run(ctx))
|
||||
}()
|
||||
// force context switch
|
||||
time.Sleep(10 * time.Millisecond)
|
||||
// FIXME: used to induce context switch.
|
||||
// Determine more deterministic method for prompting a context switch
|
||||
time.Sleep(time.Microsecond)
|
||||
requireConnect(t, rpcConfig.ListenAddress, 15)
|
||||
cli, err := httpclient.New(rpcConfig.ListenAddress)
|
||||
require.NoError(t, err)
|
||||
@@ -254,8 +256,9 @@ func TestBlockResults(t *testing.T) {
|
||||
defer wg.Done()
|
||||
require.NoError(t, d.Run(ctx))
|
||||
}()
|
||||
// force context switch
|
||||
time.Sleep(10 * time.Millisecond)
|
||||
// FIXME: used to induce context switch.
|
||||
// Determine more deterministic method for prompting a context switch
|
||||
time.Sleep(time.Microsecond)
|
||||
requireConnect(t, rpcConfig.ListenAddress, 15)
|
||||
cli, err := httpclient.New(rpcConfig.ListenAddress)
|
||||
require.NoError(t, err)
|
||||
@@ -295,8 +298,9 @@ func TestCommit(t *testing.T) {
|
||||
defer wg.Done()
|
||||
require.NoError(t, d.Run(ctx))
|
||||
}()
|
||||
// force context switch
|
||||
time.Sleep(10 * time.Millisecond)
|
||||
// FIXME: used to induce context switch.
|
||||
// Determine more deterministic method for prompting a context switch
|
||||
time.Sleep(time.Microsecond)
|
||||
requireConnect(t, rpcConfig.ListenAddress, 15)
|
||||
cli, err := httpclient.New(rpcConfig.ListenAddress)
|
||||
require.NoError(t, err)
|
||||
@@ -342,8 +346,9 @@ func TestBlockByHash(t *testing.T) {
|
||||
defer wg.Done()
|
||||
require.NoError(t, d.Run(ctx))
|
||||
}()
|
||||
// force context switch
|
||||
time.Sleep(10 * time.Millisecond)
|
||||
// FIXME: used to induce context switch.
|
||||
// Determine more deterministic method for prompting a context switch
|
||||
time.Sleep(time.Microsecond)
|
||||
requireConnect(t, rpcConfig.ListenAddress, 15)
|
||||
cli, err := httpclient.New(rpcConfig.ListenAddress)
|
||||
require.NoError(t, err)
|
||||
@@ -388,8 +393,9 @@ func TestBlockchain(t *testing.T) {
|
||||
defer wg.Done()
|
||||
require.NoError(t, d.Run(ctx))
|
||||
}()
|
||||
// force context switch
|
||||
time.Sleep(10 * time.Millisecond)
|
||||
// FIXME: used to induce context switch.
|
||||
// Determine more deterministic method for prompting a context switch
|
||||
time.Sleep(time.Microsecond)
|
||||
requireConnect(t, rpcConfig.ListenAddress, 15)
|
||||
cli, err := httpclient.New(rpcConfig.ListenAddress)
|
||||
require.NoError(t, err)
|
||||
@@ -434,8 +440,9 @@ func TestValidators(t *testing.T) {
|
||||
defer wg.Done()
|
||||
require.NoError(t, d.Run(ctx))
|
||||
}()
|
||||
// force context switch
|
||||
time.Sleep(10 * time.Millisecond)
|
||||
// FIXME: used to induce context switch.
|
||||
// Determine more deterministic method for prompting a context switch
|
||||
time.Sleep(time.Microsecond)
|
||||
requireConnect(t, rpcConfig.ListenAddress, 15)
|
||||
cli, err := httpclient.New(rpcConfig.ListenAddress)
|
||||
require.NoError(t, err)
|
||||
@@ -488,8 +495,9 @@ func TestBlockSearch(t *testing.T) {
|
||||
defer wg.Done()
|
||||
require.NoError(t, d.Run(ctx))
|
||||
}()
|
||||
// force context switch
|
||||
time.Sleep(10 * time.Millisecond)
|
||||
// FIXME: used to induce context switch.
|
||||
// Determine more deterministic method for prompting a context switch
|
||||
time.Sleep(time.Microsecond)
|
||||
requireConnect(t, rpcConfig.ListenAddress, 15)
|
||||
cli, err := httpclient.New(rpcConfig.ListenAddress)
|
||||
require.NoError(t, err)
|
||||
|
||||
@@ -27,6 +27,8 @@ type Server struct {
|
||||
}
|
||||
|
||||
// Routes returns the set of routes used by the Inspect server.
|
||||
//
|
||||
//nolint: lll
|
||||
func Routes(cfg config.RPCConfig, s state.Store, bs state.BlockStore, es []indexer.EventSink, logger log.Logger) core.RoutesMap {
|
||||
env := &core.Environment{
|
||||
Config: cfg,
|
||||
|
||||
Reference in New Issue
Block a user