mirror of
https://github.com/status-im/nim-dagger.git
synced 2025-01-11 23:24:43 +00:00
fix random failing test (#77)
This commit is contained in:
parent
aa50127c14
commit
2e8b39cf7c
@ -211,7 +211,13 @@ suite "Erasure encode/decode":
|
||||
blockIdx = toSeq(countup(offset, encoded.len - 1, encoded.steps))
|
||||
|
||||
for _ in 0..<encoded.M + 1: # NOTE: the +1
|
||||
blocks.add(rng.sample(blockIdx, blocks))
|
||||
var idx: int
|
||||
while true:
|
||||
idx = rng.sample(blockIdx, blocks)
|
||||
if not encoded[idx].isEmpty:
|
||||
break
|
||||
|
||||
blocks.add(idx)
|
||||
offset.inc
|
||||
|
||||
for idx in blocks:
|
||||
|
Loading…
x
Reference in New Issue
Block a user