diff options
| author | Dan Engelbrecht <[email protected]> | 2022-11-18 12:02:41 +0100 |
|---|---|---|
| committer | Dan Engelbrecht <[email protected]> | 2022-11-25 10:17:34 +0100 |
| commit | 5041f3521c2b3074032c06ed04a391ed90a06c7e (patch) | |
| tree | fbe6c18c79de5abff79394b69d65e38004d9e39e /zenstore/gc.cpp | |
| parent | 0.1.9 (diff) | |
| download | zen-5041f3521c2b3074032c06ed04a391ed90a06c7e.tar.xz zen-5041f3521c2b3074032c06ed04a391ed90a06c7e.zip | |
reduce parsing of compressed headers
Diffstat (limited to 'zenstore/gc.cpp')
| -rw-r--r-- | zenstore/gc.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/zenstore/gc.cpp b/zenstore/gc.cpp index 8aac65bb4..e0cddb291 100644 --- a/zenstore/gc.cpp +++ b/zenstore/gc.cpp @@ -701,7 +701,8 @@ TEST_CASE("gc.basic") IoBuffer Chunk = CreateChunk(128); auto CompressedChunk = Compress(Chunk); - const auto InsertResult = CidStore.AddChunk(CompressedChunk); + const auto InsertResult = + CidStore.AddChunk(CompressedChunk.GetCompressed().Flatten().AsIoBuffer(), IoHash::FromBLAKE3(CompressedChunk.DecodeRawHash())); CHECK(InsertResult.New); GcContext GcCtx; @@ -710,7 +711,7 @@ TEST_CASE("gc.basic") CidStore.Flush(); Gc.CollectGarbage(GcCtx); - CHECK(!CidStore.ContainsChunk(IoHash::FromBLAKE3(CompressedChunk.GetRawHash()))); + CHECK(!CidStore.ContainsChunk(IoHash::FromBLAKE3(CompressedChunk.DecodeRawHash()))); } TEST_CASE("gc.full") |