mirror of https://github.com/status-im/go-waku.git
fix(store): max records per query
This commit is contained in:
parent
5d7d05ca16
commit
04a2a3fbae
|
@ -481,7 +481,11 @@ func (store *WakuStore) Query(ctx context.Context, query Query, opts ...HistoryR
|
|||
q.PagingInfo.Direction = pb.PagingInfo_BACKWARD
|
||||
}
|
||||
|
||||
q.PagingInfo.PageSize = params.pageSize
|
||||
pageSize := params.pageSize
|
||||
if pageSize == 0 || pageSize > uint64(MaxPageSize) {
|
||||
pageSize = MaxPageSize
|
||||
}
|
||||
q.PagingInfo.PageSize = pageSize
|
||||
|
||||
response, err := store.queryFrom(ctx, q, params.selectedPeer, params.requestId)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue