erasure: fix test calculation

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
Csaba Kiraly 2023-11-15 13:20:16 +01:00
parent 05933c6ebd
commit 7c2263f028
No known key found for this signature in database
GPG Key ID: 0FE274EE8C95166E

View File

@ -57,14 +57,14 @@ asyncchecksuite "Erasure encode/decode":
let encoded = await encode(buffers, parity)
var
column = rng.rand((encoded.blocksCount - 1) div encoded.interleave) # random column
column = rng.rand(encoded.interleave - 1) # random column
dropped: seq[int]
for _ in 0..<encoded.ecM:
dropped.add(column)
(await store.delBlock(encoded.treeCid, column)).tryGet()
(await store.delBlock(manifest.treeCid, column)).tryGet()
column.inc(encoded.interleave - 1)
column.inc(encoded.interleave)
var
decoded = (await erasure.decode(encoded)).tryGet()
@ -87,7 +87,7 @@ asyncchecksuite "Erasure encode/decode":
let encoded = await encode(buffers, parity)
var
column = rng.rand((encoded.blocksCount - 1) div encoded.interleave) # random column
column = rng.rand(encoded.interleave - 1) # random column
dropped: seq[int]
for _ in 0..<encoded.ecM + 1: