use datastore has (#56)

This commit is contained in:
Dmitriy Ryajov 2022-12-02 16:47:16 -06:00 committed by GitHub
parent e4e7a3e11f
commit 4375b92298
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -170,13 +170,13 @@ proc contains*(
without key =? makeCidKey(id, peerId), err:
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.} =
without provKey =? makeProviderKey(peerId), err:
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.} =
without cidKey =? (CidKey / $cid), err: