fix_: include the whole second when specifying the end time for store queries

This commit is contained in:
Richard Ramos 2024-11-20 14:55:35 -04:00
parent fe52352690
commit a708ce1b5d
No known key found for this signature in database
GPG Key ID: 1CE87DB518195760
1 changed files with 1 additions and 1 deletions

View File

@ -193,7 +193,7 @@ func (w *gethWakuV2Wrapper) RequestStoreMessages(ctx context.Context, peerID pee
query := store.FilterCriteria{ query := store.FilterCriteria{
TimeStart: proto.Int64(int64(r.From) * int64(time.Second)), TimeStart: proto.Int64(int64(r.From) * int64(time.Second)),
TimeEnd: proto.Int64(int64(r.To) * int64(time.Second)), TimeEnd: proto.Int64(int64(time.Duration(r.To)*time.Second + time.Second - time.Nanosecond)),
ContentFilter: protocol.NewContentFilter(w.waku.GetPubsubTopic(r.PubsubTopic), contentTopics...), ContentFilter: protocol.NewContentFilter(w.waku.GetPubsubTopic(r.PubsubTopic), contentTopics...),
} }