eventstore: fix lmdb and mmm ptag-kind queries.

the prefix was missing the 2 bytes of the kind when preparing the query.

we also simplify the query planner logic a little bit and eliminate some useless fields and everything is clearer.
This commit is contained in:
fiatjaf
2026-03-22 23:59:19 -03:00
parent 6a686c31af
commit d43fbbf02d
6 changed files with 101 additions and 99 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ func (it *iterator) pull(n int, since uint32) {
return
}
if len(it.key) != query.keySize || !bytes.HasPrefix(it.key, query.prefix) {
if len(it.key) != len(query.prefix)+4 || !bytes.HasPrefix(it.key, query.prefix) {
// we reached the end of this prefix
it.exhausted = true
return