Fixes issue where ecK was used as numberOfSlots.
This commit is contained in:
parent
4bdf0dfd33
commit
c0f4512f62
|
@ -98,6 +98,12 @@ proc verificationRoot*(self: Manifest): Cid =
|
|||
proc slotRoots*(self: Manifest): seq[Cid] =
|
||||
self.slotRoots
|
||||
|
||||
proc numberOfSlots*(self: Manifest): int =
|
||||
if not self.protected:
|
||||
0
|
||||
else:
|
||||
self.ecK + self.ecM
|
||||
|
||||
############################################################
|
||||
# Operations on block list
|
||||
############################################################
|
||||
|
|
|
@ -51,7 +51,7 @@ proc selectSlotBlocks*(self: SlotBuilder, datasetSlotIndex: int): Future[?!seq[C
|
|||
let
|
||||
datasetTreeCid = self.manifest.treeCid
|
||||
blockCount = self.manifest.blocksCount
|
||||
numberOfSlots = self.manifest.ecK
|
||||
numberOfSlots = self.manifest.numberOfSlots
|
||||
strategy = SteppedIndexingStrategy.new(0, blockCount - 1, numberOfSlots)
|
||||
|
||||
for datasetBlockIndex in strategy.getIndicies(datasetSlotIndex):
|
||||
|
|
Loading…
Reference in New Issue