make quarantine and db coherent

This commit is contained in:
Agnish Ghosh 2024-11-13 15:30:54 +07:00
parent 0f659a0c1f
commit 8cc53a0428
No known key found for this signature in database
GPG Key ID: 7BDDA05D1B25E9F8
2 changed files with 4 additions and 6 deletions

View File

@ -392,11 +392,9 @@ proc processDataColumnSidecar*(
debug "Data column validated, putting data column in quarantine" debug "Data column validated, putting data column in quarantine"
self.dataColumnQuarantine[].put(newClone(dataColumnSidecar)) self.dataColumnQuarantine[].put(newClone(dataColumnSidecar))
self.dag.db.putDataColumnSidecar(dataColumnSidecar)
if self.dataColumnQuarantine[].supernode == false: debug "Validated column belongs to custody, attempting to persist",
self.dag.db.putDataColumnSidecar(dataColumnSidecar) data_column = shortLog(dataColumnSidecar)
debug "Validated column belongs to custody, attempting to persist",
data_column = shortLog(dataColumnSidecar)
let block_root = hash_tree_root(block_header) let block_root = hash_tree_root(block_header)
if (let o = self.quarantine[].popColumnless(block_root); o.isSome): if (let o = self.quarantine[].popColumnless(block_root); o.isSome):

View File

@ -541,7 +541,7 @@ proc getMissingDataColumns(rman: RequestManager): seq[DataColumnIdentifier] =
debug "Not handling missing data columns early in slot" debug "Not handling missing data columns early in slot"
continue continue
if not rman.dataColumnQuarantine[].hasMissingDataColumns(forkyBlck): if rman.dataColumnQuarantine[].hasMissingDataColumns(forkyBlck):
let missing = rman.dataColumnQuarantine[].dataColumnFetchRecord(forkyBlck) let missing = rman.dataColumnQuarantine[].dataColumnFetchRecord(forkyBlck)
if len(missing.indices) == 0: if len(missing.indices) == 0:
warn "quarantine is missing data columns, but missing indices are empty", warn "quarantine is missing data columns, but missing indices are empty",