rpc: historical validators

This commit is contained in:
Ethan Buchman
2017-08-21 18:11:16 -04:00
parent 78446fd99c
commit e2e8746044
9 changed files with 31 additions and 15 deletions

View File

@ -174,9 +174,11 @@ func (c *HTTP) Tx(hash []byte, prove bool) (*ctypes.ResultTx, error) {
return result, nil
}
func (c *HTTP) Validators() (*ctypes.ResultValidators, error) {
func (c *HTTP) Validators(height *int) (*ctypes.ResultValidators, error) {
result := new(ctypes.ResultValidators)
_, err := c.rpc.Call("validators", map[string]interface{}{}, result)
_, err := c.rpc.Call("validators", map[string]interface{}{
"height": height,
}, result)
if err != nil {
return nil, errors.Wrap(err, "Validators")
}