From 2c3fd19099ce1af939583fd57364620a494ebd70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Francisco=20L=C3=B3pez?= Date: Thu, 16 May 2024 10:11:30 +0200 Subject: [PATCH] docs: Enhanced the ParsePagination method documentation (#20385) --- types/query/pagination.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/types/query/pagination.go b/types/query/pagination.go index c7d70c404b..110dc57fa2 100644 --- a/types/query/pagination.go +++ b/types/query/pagination.go @@ -24,6 +24,11 @@ const DefaultLimit = 100 var PaginationMaxLimit uint64 = math.MaxUint64 // ParsePagination validate PageRequest and returns page number & limit. +// Note: cometBFT enforces a maximum query limit of 100 to avoid node overload. +// Queries above this limit will return the first 100 items. +// To retrieve subsequent pages, use an offset equal to the +// total number of results retrieved so far. For example, if you have retrieved 100 results and want to +// retrieve the next set of results, set the offset to 100 and the appropriate limit. func ParsePagination(pageReq *PageRequest) (page, limit int, err error) { offset := 0 limit = DefaultLimit