From e6afa0b7e70af6427d4ce0ff6a0636b5d779a8f2 Mon Sep 17 00:00:00 2001 From: haad Date: Wed, 17 Apr 2024 12:55:48 +0300 Subject: [PATCH] Remove unnecessary entry encoding step --- src/oplog/entry.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/oplog/entry.js b/src/oplog/entry.js index 650c1d7..bf58e0f 100644 --- a/src/oplog/entry.js +++ b/src/oplog/entry.js @@ -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 + } } /**