db management for data columns improved

This commit is contained in:
Agnish Ghosh 2024-10-13 15:07:18 +05:30
parent 6fc5fc79ed
commit 4462f08ccf
No known key found for this signature in database
GPG Key ID: 7BDDA05D1B25E9F8
1 changed files with 11 additions and 1 deletions

View File

@ -581,7 +581,17 @@ proc storeBlock(
withBlck(parentBlck.get()):
when consensusFork >= ConsensusFork.Deneb:
var data_column_sidecars: DataColumnSidecars
for i in 0..<NUMBER_OF_COLUMNS:
let
localSubnetCount =
if self.dataColumnQuarantine[].supernode:
DATA_COLUMN_SIDECAR_SUBNET_COUNT.uint64
else:
CUSTODY_REQUIREMENT.uint64
localCustodyColumns =
get_custody_columns(self.dataColumnQuarantine[].nodeid,
max(SAMPLES_PER_SLOT.uint64,
localSubnetCount))
for i in localCustodyColumns:
let data_column = DataColumnSidecar.new()
if not dag.db.getDataColumnSidecar(parent_root, i.ColumnIndex, data_column[]):
columnsOk = false