fix: linux-amd failure for `test_fixture_kzg` ~ peerdas branch(es) (#6428)

* move proofs and cells to ref

* move returned value to ref
This commit is contained in:
Agnish Ghosh 2024-07-17 17:24:54 +05:30 committed by GitHub
parent 6b0223b078
commit 6ec2774da9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 8 deletions

View File

@ -208,12 +208,12 @@ proc runComputeCellsTest(suiteName, suitePath, path: string) =
if blob.isNone:
check output.kind == JNull
else:
let p = computeCells(blob.get)
if p.isErr:
let p = newClone computeCells(blob.get)
if p[].isErr:
check output.kind == JNull
else:
for i in 0..<len(p.get):
check p.get[i] == fromHex[2048](output[i].getStr).get
for i in 0..<len(p[].get):
check p[].get[i] == fromHex[2048](output[i].getStr).get
proc runComputeCellsAndProofsTest(suiteName, suitePath, path: string) =
let relativePathComponent = path.relativeTestPathComponent(suitePath)
@ -230,13 +230,13 @@ proc runComputeCellsAndProofsTest(suiteName, suitePath, path: string) =
if blob.isNone:
check output.kind == JNull
else:
let p = computeCellsAndProofs(blob.get)
if p.isErr:
let p = newClone computeCellsAndProofs(blob.get)
if p[].isErr:
check output.kind == JNull
else:
for i in 0..<CELLS_PER_EXT_BLOB:
check p.get.cells[i] == fromHex[2048](output[0][i].getStr).get
check p.get.proofs[i] == fromHex[48](output[1][i].getStr).get
check p[].get.cells[i] == fromHex[2048](output[0][i].getStr).get
check p[].get.proofs[i] == fromHex[48](output[1][i].getStr).get
proc runVerifyCellKzgProofsTest(suiteName, suitePath, path: string) =
let relativePathComponent = path.relativeTestPathComponent(suitePath)