Commit Graph

5 Commits

Author SHA1 Message Date
fiatjaf
15c6093c9b define a nostr.Kind type for event kinds, make adjustments everywhere and fix some horrible bugs with mmm, lmdb and badger querying and deleting. 2025-04-20 11:15:41 -03:00
fiatjaf
32efaa7c58 tests on root and khatru working. 2025-04-17 20:30:44 -03:00
fiatjaf
b4268d649c a bunch of [32]byte conversions. still more needed. 2025-04-14 17:47:53 -03:00
K
c91e7b9765 using testify instead of testing.T methods. (#143) 2024-09-09 07:20:56 -03:00
fiatjaf
5938a71146 replace close() with actually sending a value to .EndOfStoredEvents and .Closed channels.
I thought `close()` would be nice because it would be cheap and not lock the goroutine while waiting for the receiver to acknowledge the thing, but turns out it introduces the serious risk of users putting <- sub.EndOfStoredEvents in the same for { select {} } statement as sub.Events, for example, and they they get into an infinite loop.

we had this same problem here inside this same library, and what is fixed in 242af0bf76 by @mattn.
2024-01-01 10:18:16 -03:00