mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-13 05:11:21 +00:00
Client: DumpConsensusState, not DialSeeds. Cleanup
This commit is contained in:
@ -124,46 +124,3 @@ func (c Client) Commit(height int) (*ctypes.ResultCommit, error) {
|
||||
func (c Client) Validators() (*ctypes.ResultValidators, error) {
|
||||
return core.Validators()
|
||||
}
|
||||
|
||||
/** websocket event stuff here... **/
|
||||
|
||||
/*
|
||||
// StartWebsocket starts up a websocket and a listener goroutine
|
||||
// if already started, do nothing
|
||||
func (c Client) StartWebsocket() error {
|
||||
var err error
|
||||
if c.ws == nil {
|
||||
ws := rpcclient.NewWSClient(c.remote, c.endpoint)
|
||||
_, err = ws.Start()
|
||||
if err == nil {
|
||||
c.ws = ws
|
||||
}
|
||||
}
|
||||
return errors.Wrap(err, "StartWebsocket")
|
||||
}
|
||||
|
||||
// StopWebsocket stops the websocket connection
|
||||
func (c Client) StopWebsocket() {
|
||||
if c.ws != nil {
|
||||
c.ws.Stop()
|
||||
c.ws = nil
|
||||
}
|
||||
}
|
||||
|
||||
// GetEventChannels returns the results and error channel from the websocket
|
||||
func (c Client) GetEventChannels() (chan json.RawMessage, chan error) {
|
||||
if c.ws == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return c.ws.ResultsCh, c.ws.ErrorsCh
|
||||
}
|
||||
|
||||
func (c Client) Subscribe(event string) error {
|
||||
return errors.Wrap(c.ws.Subscribe(event), "Subscribe")
|
||||
}
|
||||
|
||||
func (c Client) Unsubscribe(event string) error {
|
||||
return errors.Wrap(c.ws.Unsubscribe(event), "Unsubscribe")
|
||||
}
|
||||
|
||||
*/
|
||||
|
Reference in New Issue
Block a user