mirror of
https://github.com/logos-storage/logos-storage-nim-dht.git
synced 2026-01-07 16:03:09 +00:00
use datastore has (#56)
This commit is contained in:
parent
e4e7a3e11f
commit
4375b92298
@ -170,13 +170,13 @@ proc contains*(
|
|||||||
without key =? makeCidKey(id, peerId), err:
|
without key =? makeCidKey(id, peerId), err:
|
||||||
return false
|
return false
|
||||||
|
|
||||||
return (await self.store.contains(key)) |? false
|
return (await self.store.has(key)) |? false
|
||||||
|
|
||||||
proc contains*(self: ProvidersManager, peerId: PeerId): Future[bool] {.async.} =
|
proc contains*(self: ProvidersManager, peerId: PeerId): Future[bool] {.async.} =
|
||||||
without provKey =? makeProviderKey(peerId), err:
|
without provKey =? makeProviderKey(peerId), err:
|
||||||
return false
|
return false
|
||||||
|
|
||||||
return (await self.store.contains(provKey)) |? false
|
return (await self.store.has(provKey)) |? false
|
||||||
|
|
||||||
proc contains*(self: ProvidersManager, cid: NodeId): Future[bool] {.async.} =
|
proc contains*(self: ProvidersManager, cid: NodeId): Future[bool] {.async.} =
|
||||||
without cidKey =? (CidKey / $cid), err:
|
without cidKey =? (CidKey / $cid), err:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user