main.go: pass PageSize param to legacy req instead of 20 hardcoded

This commit is contained in:
Ivan Folgueira Bande 2024-07-11 23:35:56 +02:00
parent 835f73229c
commit e635d3cd28
No known key found for this signature in database
GPG Key ID: 3C117481F89E24A7

View File

@ -252,6 +252,7 @@ func QueryMessages(ctx context.Context, opts Options) error {
}
cnt := 0
if !options.UseLegacy {
var criteria store.Criteria
@ -352,7 +353,7 @@ func QueryMessages(ctx context.Context, opts Options) error {
ctx, cancel := context.WithTimeout(context.Background(), options.QueryTimeout)
result, err := wakuNode.LegacyStore().Query(ctx, query,
legacy_store.WithPeerAddr(*options.StoreNode),
legacy_store.WithPaging(false, 20),
legacy_store.WithPaging(false, options.PageSize),
)
ellapsed := time.Since(now)
cancel()