mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-19 19:09:08 +00:00
fix: suggested fixes
This commit is contained in:
parent
2615514909
commit
96b3e95f8e
@ -87,9 +87,10 @@ proc recover_matrix*(cells_dict: Table[(BlobIndex, CellID), Cell], blobCount: ui
|
||||
var extended_matrix: ExtendedMatrix
|
||||
|
||||
for blobIndex in 0'u64..<blobCount:
|
||||
var cellIds: seq[CellID] = @[]
|
||||
var blIdx: BlobIndex
|
||||
var cellId: CellID
|
||||
var
|
||||
cellIds: seq[CellID] = @[]
|
||||
blIdx: BlobIndex
|
||||
cellId: CellID
|
||||
let key = (blIdx, cellId)
|
||||
|
||||
for key, cell in pairs(cells_dict):
|
||||
@ -126,7 +127,7 @@ proc get_data_column_sidecars*(signed_block: deneb.SignedBeaconBlock, blobs: seq
|
||||
computed_cell = computeCellsAndKzgProofs(blob)
|
||||
|
||||
if computed_cell.isErr():
|
||||
fatal "EIP7549: Could not compute cells"
|
||||
return err("EIP7549: Could not compute cells")
|
||||
|
||||
cellsAndProofs.add(computed_cell.get())
|
||||
|
||||
|
@ -212,7 +212,7 @@ proc runComputeCellsTest(suiteName, suitePath, path: string) =
|
||||
if p.isErr:
|
||||
check output.kind == JNull
|
||||
else:
|
||||
for i in 0..<128:
|
||||
for i in 0..<len(p.get):
|
||||
check p.get[i] == fromHex[2048](output[i].getStr).get
|
||||
|
||||
proc runComputeCellsAndProofsTest(suiteName, suitePath, path: string) =
|
||||
@ -234,7 +234,7 @@ proc runComputeCellsAndProofsTest(suiteName, suitePath, path: string) =
|
||||
if p.isErr:
|
||||
check output.kind == JNull
|
||||
else:
|
||||
for i in 0..<128:
|
||||
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
|
||||
|
||||
@ -316,7 +316,7 @@ proc runRecoverAllCellsTest(suiteName, suitePath, path: string) =
|
||||
if v.isErr:
|
||||
check output.kind == JNull
|
||||
else:
|
||||
for i in 0..<128:
|
||||
for i in 0..<CELLS_PER_EXT_BLOB:
|
||||
check v.get[i] == fromHex[2048](output[i].getStr).get
|
||||
|
||||
from std/algorithm import sorted
|
||||
|
@ -76,8 +76,4 @@ suite "EF - EIP7594 - Networking" & preset():
|
||||
let basePath =
|
||||
presetPath/"eip7594"/"networking"/"get_custody_columns"/"pyspec_tests"
|
||||
for kind, path in walkDir(basePath, relative = true, checkDir = true):
|
||||
runGetCustodyColumns(suiteName, basePath/path)
|
||||
|
||||
|
||||
|
||||
|
||||
runGetCustodyColumns(suiteName, basePath/path)
|
Loading…
x
Reference in New Issue
Block a user