don't touch the cache when checking for id

This commit is contained in:
Dmitriy Ryajov 2022-09-12 21:08:26 -06:00
parent 23e20a2f1c
commit f84bc647ce
No known key found for this signature in database
GPG Key ID: DA8C680CE7C657A4
1 changed files with 1 additions and 1 deletions

View File

@ -337,7 +337,7 @@ proc addProviderLocal(p: Protocol, cId: NodeId, prov: SignedPeerRecord) =
trace "adding provider to local db", n=p.localNode, cId, prov
var providers =
if p.providers.get(cId).isNone:
if cId notin p.providers:
ProvidersCache.init(MaxProvidersPerEntry)
else:
p.providers.get(cId).get()