diff --git a/tests/codex/testerasure.nim b/tests/codex/testerasure.nim index 71e438a6..fa034001 100644 --- a/tests/codex/testerasure.nim +++ b/tests/codex/testerasure.nim @@ -1,4 +1,5 @@ import std/sequtils +import std/sugar import pkg/asynctest import pkg/chronos @@ -42,8 +43,8 @@ asyncchecksuite "Erasure encode/decode": parity)).tryGet() check: - encoded.len mod (buffers + parity) == 0 - encoded.rounded == roundUp(manifest.len, buffers) + encoded.blocksCount mod (buffers + parity) == 0 + encoded.rounded == roundUp(manifest.blocksCount, buffers) encoded.steps == encoded.rounded div buffers return encoded @@ -56,14 +57,14 @@ asyncchecksuite "Erasure encode/decode": let encoded = await encode(buffers, parity) var - column = rng.rand((encoded.blocksCount - 1) div encoded.steps) # random column + column = rng.rand((encoded.blocksCount div encoded.steps) - 1) # random column dropped: seq[int] for _ in 0..