From 3f14f6b4baacb85cb8ecd6072a9c74053f96b136 Mon Sep 17 00:00:00 2001 From: Agnish Ghosh Date: Sun, 13 Oct 2024 22:09:52 +0530 Subject: [PATCH] avoid taking an optimistic approach for detecting missing data columns --- .../data_column_quarantine.nim | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/beacon_chain/consensus_object_pools/data_column_quarantine.nim b/beacon_chain/consensus_object_pools/data_column_quarantine.nim index b7ccf34d5..be4a97044 100644 --- a/beacon_chain/consensus_object_pools/data_column_quarantine.nim +++ b/beacon_chain/consensus_object_pools/data_column_quarantine.nim @@ -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 =