mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-03-30 15:08:28 +00:00
Move the cache back outside the verify message method.
This commit is contained in:
parent
29ba745e4a
commit
f064deafb1
@ -51,8 +51,10 @@ const signMessage = async (key, data) => {
|
||||
return Buffer.from(await key.sign(data)).toString('hex')
|
||||
}
|
||||
|
||||
const verifiedCachePromise = LRUStorage({ size: 1000 })
|
||||
|
||||
const verifyMessage = async (signature, publicKey, data) => {
|
||||
const verifiedCache = await LRUStorage({ size: 1000 })
|
||||
const verifiedCache = await verifiedCachePromise
|
||||
const cached = await verifiedCache.get(signature)
|
||||
|
||||
let res = false
|
||||
|
Loading…
x
Reference in New Issue
Block a user