Revert "earlier `.add()` on pool `_knownIds`."

This reverts commit 687f387385.
This commit is contained in:
fiatjaf 2023-03-27 10:27:42 -03:00
parent 74c77a2e9f
commit 24d885aaeb
No known key found for this signature in database
GPG Key ID: BAD43C4BE5C1A3A1
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,6 @@ export class SimplePool {
let set = this._seenOn[id] || new Set()
set.add(url)
this._seenOn[id] = set
_knownIds.add(id)
return _knownIds.has(id)
}
@ -81,6 +80,7 @@ export class SimplePool {
if (!r) return
let s = r.sub(filters, modifiedOpts)
s.on('event', (event: Event) => {
_knownIds.add(event.id as string)
for (let cb of eventListeners.values()) cb(event)
})
s.on('eose', () => {