add: condition for being able to selfReconstruct
This commit is contained in:
parent
7faec9b7a3
commit
329fc21eab
|
@ -338,3 +338,14 @@ func verify_data_column_sidecar_inclusion_proof*(sidecar: DataColumnSidecar): Re
|
||||||
return err("DataColumnSidecar: inclusion proof not valid")
|
return err("DataColumnSidecar: inclusion proof not valid")
|
||||||
|
|
||||||
ok()
|
ok()
|
||||||
|
|
||||||
|
proc selfReconstructDataColumns*(numCol: uint64):
|
||||||
|
bool =
|
||||||
|
# This function tells whether data columns can be
|
||||||
|
# reconstructed or not
|
||||||
|
const totalColumns = NUMBER_OF_COLUMNS.uint64
|
||||||
|
let
|
||||||
|
columnsNeeded = totalColumns div 2 + totalColumns mod 2
|
||||||
|
if numCol >= columnsNeeded:
|
||||||
|
return true
|
||||||
|
false
|
||||||
|
|
Loading…
Reference in New Issue