Update wakuv2/missing_messages.go

Co-authored-by: Igor Sirotin <sirotin@status.im>
This commit is contained in:
richΛrd 2024-08-12 13:32:31 -04:00 committed by GitHub
parent 1915ab9000
commit 34112a9c4c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 2 deletions

View File

@ -241,8 +241,7 @@ func (w *Waku) fetchMessagesBatch(missingHistoryRequest TopicInterest, batchFrom
// Split into batches // Split into batches
for i := 0; i < len(missingHashes); i += maxHashQueryLength { for i := 0; i < len(missingHashes); i += maxHashQueryLength {
j := i + maxHashQueryLength j := i + maxHashQueryLength
if j > len(missingHashes) { j = math.Min(j, len(missingHashes))
j = len(missingHashes)
} }
wg.Add(1) wg.Add(1)