Merge pull request #6 from waku-org/typo-message-page-in-legacy

main.go: pass PageSize param to legacy req instead of 20 hardcoded
This commit is contained in:
Ivan FB 2024-07-11 23:43:09 +02:00 committed by GitHub
commit 329af027ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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()