avoid taking an optimistic approach for detecting missing data columns

This commit is contained in:
Agnish Ghosh 2024-10-13 22:09:52 +05:30
parent 1cf1a62367
commit 3f14f6b4ba
No known key found for this signature in database
GPG Key ID: 7BDDA05D1B25E9F8
1 changed files with 6 additions and 6 deletions

View File

@ -154,13 +154,13 @@ func hasMissingDataColumns*(quarantine: DataColumnQuarantine,
if (blck.root, ColumnIndex i) notin quarantine.data_columns and
len(blck.message.body.blob_kzg_commitments) != 0:
inc counter
if quarantine.supernode and counter == NUMBER_OF_COLUMNS:
return true
elif quarantine.supernode == false and
counter == max(SAMPLES_PER_SLOT, CUSTODY_REQUIREMENT):
return true
else:
if quarantine.supernode and counter != NUMBER_OF_COLUMNS:
return false
elif quarantine.supernode == false and
counter != max(SAMPLES_PER_SLOT, CUSTODY_REQUIREMENT):
return false
else:
return true
func hasEnoughDataColumns*(quarantine: DataColumnQuarantine,
blck: deneb.SignedBeaconBlock | electra.SignedBeaconBlock): bool =