chore: remove useless `registerEvent`

This commit is contained in:
Ludovic Chenut 2024-09-27 12:04:37 +02:00
parent 5d48776b02
commit 021d618e6f
No known key found for this signature in database
GPG Key ID: D9A59B1907F1D50C
1 changed files with 0 additions and 4 deletions

View File

@ -312,8 +312,6 @@ type
salt: string salt: string
defaultDT: Moment defaultDT: Moment
registerDeletionLoop: Future[void] registerDeletionLoop: Future[void]
#registerEvent: AsyncEvent # TODO: to raise during the heartbeat
# + make the heartbeat sleep duration "smarter"
sema: AsyncSemaphore sema: AsyncSemaphore
peers: seq[PeerId] peers: seq[PeerId]
cookiesSaved: Table[PeerId, Table[string, seq[byte]]] cookiesSaved: Table[PeerId, Table[string, seq[byte]]]
@ -402,7 +400,6 @@ proc save(
) )
) )
rdv.namespaces[nsSalted].add(rdv.registered.high) rdv.namespaces[nsSalted].add(rdv.registered.high)
# rdv.registerEvent.fire()
except KeyError: except KeyError:
doAssert false, "Should have key" doAssert false, "Should have key"
@ -708,7 +705,6 @@ proc new*(
salt: string.fromBytes(generateBytes(rng[], 8)), salt: string.fromBytes(generateBytes(rng[], 8)),
registered: initOffsettedSeq[RegisteredData](1), registered: initOffsettedSeq[RegisteredData](1),
defaultDT: Moment.now() - 1.days, defaultDT: Moment.now() - 1.days,
#registerEvent: newAsyncEvent(),
sema: newAsyncSemaphore(SemaphoreDefaultSize), sema: newAsyncSemaphore(SemaphoreDefaultSize),
minDuration: minDuration, minDuration: minDuration,
maxDuration: maxDuration, maxDuration: maxDuration,