don't need all data columns to declare it columnless

This commit is contained in:
Agnish Ghosh 2024-10-08 03:16:44 +05:30
parent e962f591cc
commit 162a3bd6cf
2 changed files with 3 additions and 6 deletions

View File

@ -96,10 +96,9 @@ func hasDataColumns*(quarantine: DataColumnQuarantine,
quarantine.data_columns.hasKey( quarantine.data_columns.hasKey(
(blck.root, idx)): (blck.root, idx)):
inc counter inc counter
if counter > 1: if counter == 0:
return true
else:
return false return false
true
func dataColumnFetchRecord*(quarantine: DataColumnQuarantine, func dataColumnFetchRecord*(quarantine: DataColumnQuarantine,
blck: deneb.SignedBeaconBlock | electra.SignedBeaconBlock): DataColumnFetchRecord = blck: deneb.SignedBeaconBlock | electra.SignedBeaconBlock): DataColumnFetchRecord =

View File

@ -427,9 +427,7 @@ proc initFullNode(
# maybeFinalized = maybeFinalized) # maybeFinalized = maybeFinalized)
when consensusFork >= ConsensusFork.Deneb: when consensusFork >= ConsensusFork.Deneb:
if not dataColumnQuarantine[].hasDataColumns(forkyBlck): if len(forkyBlck.message.body.blob_kzg_commitments) != 0:
# We don't have all the data columns for this block, so we have
# to put it in columnless quarantine.
if not quarantine[].addColumnless(dag.finalizedHead.slot, forkyBlck): if not quarantine[].addColumnless(dag.finalizedHead.slot, forkyBlck):
err(VerifierError.UnviableFork) err(VerifierError.UnviableFork)
else: else: