revert Manifest and Block to ref objects to avoid triggering broken sink/move semantics

This commit is contained in:
gmega 2024-02-23 11:50:18 -03:00
parent 13d4e1453f
commit a274d24583
No known key found for this signature in database
GPG Key ID: FFD8DAF00660270F
2 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ import ./codextypes
export errors, logutils, units, codextypes
type
Block* = object
Block* = ref object
cid*: Cid
data*: seq[byte]

View File

@ -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)