define a nostr.Kind type for event kinds, make adjustments everywhere and fix some horrible bugs with mmm, lmdb and badger querying and deleting.

This commit is contained in:
fiatjaf
2025-04-20 11:14:39 -03:00
parent 27f40c2cf2
commit 15c6093c9b
74 changed files with 689 additions and 404 deletions
+2 -2
View File
@@ -17,7 +17,7 @@ func manyAuthorsTest(t *testing.T, db eventstore.Store) {
const total = 10000
const limit = 500
const authors = 1700
kinds := []uint16{6, 7, 8}
kinds := []nostr.Kind{6, 7, 8}
bigfilter := nostr.Filter{
Authors: make([]nostr.PubKey, authors),
@@ -40,7 +40,7 @@ func manyAuthorsTest(t *testing.T, db eventstore.Store) {
CreatedAt: nostr.Timestamp(i*i) / 4,
Content: fmt.Sprintf("lots of stuff %d", i),
Tags: nostr.Tags{},
Kind: uint16(i % 10),
Kind: nostr.Kind(i % 10),
}
err := evt.Sign([32]byte(sk))
require.NoError(t, err)