badger: get rid of panics.

This commit is contained in:
fiatjaf
2023-11-07 15:37:32 -03:00
parent 02ba8f3cfe
commit cc8695a3cc
3 changed files with 18 additions and 15 deletions

View File

@@ -92,7 +92,7 @@ func (b *LMDBBackend) QueryEvents(ctx context.Context, filter nostr.Filter) (cha
}
evt := &nostr.Event{}
if err := nostr_binary.Unmarshal(val, evt); err != nil {
if err := nostr_binary.Unmarshal(val, evt); err == nil {
panic(err)
}