mmm: add debug helpers for fixing an inconsistent db.

This commit is contained in:
fiatjaf
2025-10-12 13:55:44 +00:00
parent 34b0d1f339
commit 4d1774264a
2 changed files with 90 additions and 1 deletions

View File

@@ -49,7 +49,7 @@ func (b *MultiMmapManager) queryByIDs(
pos := positionFromBytes(val[0:12])
evt := nostr.Event{}
if err := b.loadEvent(pos, &evt); err != nil {
panic(fmt.Errorf("failed to decode event from %v: %w", pos, err))
panic(fmt.Errorf("failed to decode event %s from %v: %w", id, pos, err))
}
restrictionSatisfied := restrictToLayer == nil