fix validate pagination params

This commit is contained in:
Ethan Buchman
2018-05-20 01:35:42 -04:00
parent 8d60a5a7bd
commit 6f9867cba6
3 changed files with 74 additions and 3 deletions

View File

@ -188,7 +188,7 @@ func TxSearch(query string, prove bool, page, perPage int) (*ctypes.ResultTxSear
}
totalCount := len(results)
page = validatePage(page)
page = validatePage(page, perPage, totalCount)
perPage = validatePerPage(perPage)
skipCount := (page - 1) * perPage