add more checking in rpc response
This commit is contained in:
parent
cb3f775f75
commit
9ede8028c0
|
@ -387,6 +387,9 @@ proc verify_data_column_sidecar_kzg_proofs*(sidecar: DataColumnSidecar):
|
|||
## Verify if the KZG Proofs consisting in the `DataColumnSidecar`
|
||||
## is valid or not.
|
||||
|
||||
if not (sidecar.kzg_commitments.len == 0):
|
||||
return err("Kzg commitments length cannot be 0")
|
||||
|
||||
# Check if the data column sidecar index < NUMBER_OF_COLUMNS
|
||||
if not (sidecar.index < NUMBER_OF_COLUMNS):
|
||||
return err("Data column sidecar index exceeds the NUMBER_OF_COLUMNS")
|
||||
|
|
|
@ -153,6 +153,8 @@ proc checkResponse(colIdList: seq[DataColumnIdentifier],
|
|||
break
|
||||
if not found:
|
||||
return false
|
||||
column[].verify_data_column_sidecar_kzg_proofs()isOkOr:
|
||||
return false
|
||||
column[].verify_data_column_sidecar_inclusion_proof().isOkOr:
|
||||
return false
|
||||
true
|
||||
|
|
Loading…
Reference in New Issue