Client: DumpConsensusState, not DialSeeds. Cleanup

This commit is contained in:
Ethan Frey
2017-02-24 17:04:38 +01:00
parent 931af6a072
commit 98450ee2db
5 changed files with 21 additions and 95 deletions

View File

@ -39,6 +39,10 @@ func (c *HTTP) _assertIsClient() Client {
return c
}
func (c *HTTP) _assertIsNetworkClient() NetworkClient {
return c
}
func (c *HTTP) Status() (*ctypes.ResultStatus, error) {
tmResult := new(ctypes.TMResult)
_, err := c.rpc.Call("status", []interface{}{}, tmResult)
@ -102,14 +106,13 @@ func (c *HTTP) NetInfo() (*ctypes.ResultNetInfo, error) {
return (*tmResult).(*ctypes.ResultNetInfo), nil
}
func (c *HTTP) DialSeeds(seeds []string) (*ctypes.ResultDialSeeds, error) {
func (c *HTTP) DumpConsensusState() (*ctypes.ResultDumpConsensusState, error) {
tmResult := new(ctypes.TMResult)
// TODO: is this the correct way to marshall seeds?
_, err := c.rpc.Call("dial_seeds", []interface{}{seeds}, tmResult)
_, err := c.rpc.Call("dump_consensus_state", nil, tmResult)
if err != nil {
return nil, errors.Wrap(err, "DialSeeds")
return nil, errors.Wrap(err, "DumpConsensusState")
}
return (*tmResult).(*ctypes.ResultDialSeeds), nil
return (*tmResult).(*ctypes.ResultDumpConsensusState), nil
}
func (c *HTTP) BlockchainInfo(minHeight, maxHeight int) (*ctypes.ResultBlockchainInfo, error) {