since and until are not pointers anymore because that is too annoying.

This commit is contained in:
fiatjaf
2025-05-08 09:32:54 -03:00
parent 0853405c03
commit c0934e0639
17 changed files with 55 additions and 85 deletions

View File

@@ -36,8 +36,8 @@ func (b *LMDBBackend) prepareQueries(filter nostr.Filter) (
}
var until uint32 = 4294967295
if filter.Until != nil {
if fu := uint32(*filter.Until); fu < until {
if filter.Until != 0 {
if fu := uint32(filter.Until); fu < until {
until = fu + 1
}
}
@@ -62,8 +62,8 @@ func (b *LMDBBackend) prepareQueries(filter nostr.Filter) (
}
// this is where we'll end the iteration
if filter.Since != nil {
if fs := uint32(*filter.Since); fs > since {
if filter.Since != 0 {
if fs := uint32(filter.Since); fs > since {
since = fs
}
}