Add pagination to /validators

- closes #3472

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
This commit is contained in:
Marko Baricevic
2019-09-17 15:11:04 +02:00
parent 45ddd67bd6
commit 74a02b1d2b
6 changed files with 33 additions and 9 deletions
+1 -1
View File
@@ -106,7 +106,7 @@ func (p *provider) getValidatorSet(chainID string, height int64) (valset *types.
err = fmt.Errorf("expected height >= 1, got height %v", height)
return
}
res, err := p.client.Validators(&height)
res, err := p.client.Validators(&height, 0, 0) // page & perPage are hard coded to 0 to get the entire validator set in one request
if err != nil {
// TODO pass through other types of errors.
return nil, lerr.ErrUnknownValidators(chainID, height)