From a274d245831c138439a4c92fdd641c7e2991c1d1 Mon Sep 17 00:00:00 2001 From: gmega Date: Fri, 23 Feb 2024 11:50:18 -0300 Subject: [PATCH] revert Manifest and Block to ref objects to avoid triggering broken sink/move semantics --- codex/blocktype.nim | 2 +- codex/manifest/manifest.nim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/codex/blocktype.nim b/codex/blocktype.nim index c27c3d51..d215d169 100644 --- a/codex/blocktype.nim +++ b/codex/blocktype.nim @@ -31,7 +31,7 @@ import ./codextypes export errors, logutils, units, codextypes type - Block* = object + Block* = ref object cid*: Cid data*: seq[byte] diff --git a/codex/manifest/manifest.nim b/codex/manifest/manifest.nim index 0ccf5a3d..9aa520e9 100644 --- a/codex/manifest/manifest.nim +++ b/codex/manifest/manifest.nim @@ -29,7 +29,7 @@ import ../logutils # TODO: Manifest should be reworked to more concrete types, # perhaps using inheritance type - Manifest* = object + Manifest* = ref object treeCid {.serialize.}: Cid # Root of the merkle tree datasetSize {.serialize.}: NBytes # Total size of all blocks blockSize {.serialize.}: NBytes # Size of each contained block (might not be needed if blocks are len-prefixed)