filter.GetTheoreticalLimit() to encompass the actual limit specified in the filter.
This commit is contained in:
@@ -31,14 +31,11 @@ func (b *LMDBBackend) QueryEvents(filter nostr.Filter, maxLimit int) iter.Seq[no
|
||||
}
|
||||
|
||||
// max number of events we'll return
|
||||
if tlimit := filter.GetTheoreticalLimit(); tlimit == 0 || filter.LimitZero {
|
||||
if tlimit := filter.GetTheoreticalLimit(); tlimit == 0 {
|
||||
return
|
||||
} else if tlimit < maxLimit {
|
||||
maxLimit = tlimit
|
||||
}
|
||||
if filter.Limit > 0 && filter.Limit < maxLimit {
|
||||
maxLimit = filter.Limit
|
||||
}
|
||||
|
||||
// do a normal query based on various filters
|
||||
if err := b.lmdbEnv.View(func(txn *lmdb.Txn) error {
|
||||
|
||||
Reference in New Issue
Block a user