filter.GetTheoreticalLimit() to encompass the actual limit specified in the filter.
This commit is contained in:
@@ -96,14 +96,11 @@ func (il *IndexingLayer) QueryEvents(filter nostr.Filter, maxLimit int) iter.Seq
|
||||
}
|
||||
|
||||
// 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
|
||||
}
|
||||
|
||||
il.lmdbEnv.View(func(txn *lmdb.Txn) error {
|
||||
txn.RawRead = true
|
||||
|
||||
Reference in New Issue
Block a user