eventstore: more consistent ErrDupEvent firing.
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
|
||||
"fiatjaf.com/nostr"
|
||||
"fiatjaf.com/nostr/eventstore"
|
||||
"fiatjaf.com/nostr/eventstore/codec/betterbinary"
|
||||
"github.com/PowerDNS/lmdb-go/lmdb"
|
||||
)
|
||||
@@ -32,6 +33,10 @@ func (b *LMDBBackend) SaveEvent(evt nostr.Event) error {
|
||||
return b.save(txn, evt)
|
||||
}
|
||||
|
||||
if err == nil {
|
||||
return eventstore.ErrDupEvent
|
||||
}
|
||||
|
||||
return err
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user