From 11508c41c2a4a0037d1233edffc82e900880afcb Mon Sep 17 00:00:00 2001 From: Agnish Ghosh Date: Sun, 13 Oct 2024 05:15:57 +0530 Subject: [PATCH] check edge cases --- .../data_column_quarantine.nim | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/beacon_chain/consensus_object_pools/data_column_quarantine.nim b/beacon_chain/consensus_object_pools/data_column_quarantine.nim index 17ee57618..c8c2ee0a0 100644 --- a/beacon_chain/consensus_object_pools/data_column_quarantine.nim +++ b/beacon_chain/consensus_object_pools/data_column_quarantine.nim @@ -129,7 +129,6 @@ func checkForInitialDcSidecars*(quarantine: DataColumnQuarantine, func hasMissingDataColumns*(quarantine: DataColumnQuarantine, blck: deneb.SignedBeaconBlock | electra.SignedBeaconBlock): bool = - var counter = 0 let localSubnetCount = if quarantine.supernode: @@ -141,16 +140,10 @@ func hasMissingDataColumns*(quarantine: DataColumnQuarantine, max(SAMPLES_PER_SLOT.uint64, localSubnetCount)) for i in localCustodyColumns: - if (blck.root, ColumnIndex i) in quarantine.data_columns and + 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: - return false + return false + true func hasEnoughDataColumns*(quarantine: DataColumnQuarantine, blck: deneb.SignedBeaconBlock | electra.SignedBeaconBlock): bool =