You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.3 KiB

  1. /*
  2. Package inspect provides a tool for investigating the state of a
  3. failed Tendermint node.
  4. This package provides the Inspector type. The Inspector type runs a subset of the Tendermint
  5. RPC endpoints that are useful for debugging issues with Tendermint consensus.
  6. When a node running the Tendermint consensus engine detects an inconsistent consensus state,
  7. the entire node will crash. The Tendermint consensus engine cannot run in this
  8. inconsistent state so the node will not be able to start up again.
  9. The RPC endpoints provided by the Inspector type allow for a node operator to inspect
  10. the block store and state store to better understand what may have caused the inconsistent state.
  11. The Inspector type's lifecycle is controlled by a context.Context
  12. ins := inspect.NewFromConfig(rpcConfig)
  13. ctx, cancelFunc:= context.WithCancel(context.Background())
  14. // Run blocks until the Inspector server is shut down.
  15. go ins.Run(ctx)
  16. ...
  17. // calling the cancel function will stop the running inspect server
  18. cancelFunc()
  19. Inspector serves its RPC endpoints on the address configured in the RPC configuration
  20. rpcConfig.ListenAddress = "tcp://127.0.0.1:26657"
  21. ins := inspect.NewFromConfig(rpcConfig)
  22. go ins.Run(ctx)
  23. The list of available RPC endpoints can then be viewed by navigating to
  24. http://127.0.0.1:26657/ in the web browser.
  25. */
  26. package inspect