From 8dbd301a196041a36be455c1b4cedc81f0d634fe Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Mon, 12 Dec 2022 13:34:51 +0100 Subject: Changed so CompressedBuffer::DecodeRawHash returns IoHash just like on the UE side (#208) removed all use of IoHash::FromBLAKE3() caused by interactions with CompressedBuffer APIs --- zenserver/cache/structuredcachestore.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'zenserver/cache/structuredcachestore.cpp') diff --git a/zenserver/cache/structuredcachestore.cpp b/zenserver/cache/structuredcachestore.cpp index ecb41d57e..9f6707a4a 100644 --- a/zenserver/cache/structuredcachestore.cpp +++ b/zenserver/cache/structuredcachestore.cpp @@ -3101,8 +3101,7 @@ TEST_CASE("z$.scrub") { IoBuffer AttachmentData = CreateBinaryCacheValue(AttachmentSizes[Index]); CompressedBuffer CompressedAttachmentData = CompressedBuffer::Compress(SharedBuffer(AttachmentData)); - Record.AddBinaryAttachment(fmt::format("attachment-{}", Index), - IoHash::FromBLAKE3(CompressedAttachmentData.DecodeRawHash())); + Record.AddBinaryAttachment(fmt::format("attachment-{}", Index), CompressedAttachmentData.DecodeRawHash()); Result.Attachments[Index] = CompressedAttachmentData; } Result.Record = Record.Save().GetBuffer().AsIoBuffer(); @@ -3144,7 +3143,7 @@ TEST_CASE("z$.scrub") Zcs.Put("mybucket", Cid, {.Value = Record.Record}); for (const CompressedBuffer& Attachment : Record.Attachments) { - CidStore.AddChunk(Attachment.GetCompressed().Flatten().AsIoBuffer(), IoHash::FromBLAKE3(Attachment.DecodeRawHash())); + CidStore.AddChunk(Attachment.GetCompressed().Flatten().AsIoBuffer(), Attachment.DecodeRawHash()); } } }; -- cgit v1.2.3