mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-10-07 22:57:07 +00:00
Remove unnecessary entry encoding step
This commit is contained in:
@@ -147,8 +147,13 @@ const isEqual = (a, b) => {
|
||||
* @private
|
||||
*/
|
||||
const decode = async (bytes) => {
|
||||
const { value } = await Block.decode({ bytes, codec, hasher })
|
||||
return encode(value)
|
||||
const { cid, value } = await Block.decode({ bytes, codec, hasher })
|
||||
const hash = cid.toString(hashStringEncoding)
|
||||
return {
|
||||
...value,
|
||||
hash,
|
||||
bytes
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user