Skip to content

Commit dcfc1cb

Browse files
committed
supernodes to da on NUMBER_OF_COLUMNS div 2
1 parent 87157e0 commit dcfc1cb

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

beacon_chain/consensus_object_pools/blob_quarantine.nim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ func hasSidecars*(
460460
supernode = (len(quarantine.custodyColumns) == NUMBER_OF_COLUMNS)
461461
columnsCount =
462462
if supernode:
463-
(NUMBER_OF_COLUMNS div 2 + 1)
463+
NUMBER_OF_COLUMNS div 2
464464
else:
465465
len(quarantine.custodyColumns)
466466

@@ -546,7 +546,7 @@ proc popSidecars*(
546546
supernode = (len(quarantine.custodyColumns) == NUMBER_OF_COLUMNS)
547547
columnsCount =
548548
if supernode:
549-
(NUMBER_OF_COLUMNS div 2 + 1)
549+
NUMBER_OF_COLUMNS div 2
550550
else:
551551
len(quarantine.custodyColumns)
552552

@@ -567,10 +567,10 @@ proc popSidecars*(
567567
"Record should only have loaded values, but it is `" &
568568
$sidecar.kind & "`")
569569
sidecars.add(sidecar.data)
570-
if len(sidecars) >= (NUMBER_OF_COLUMNS div 2 + 1):
570+
if len(sidecars) >= NUMBER_OF_COLUMNS div 2:
571571
break
572572

573-
doAssert(len(sidecars) >= (NUMBER_OF_COLUMNS div 2 + 1),
573+
doAssert(len(sidecars) >= NUMBER_OF_COLUMNS div 2,
574574
"Incorrect amount of sidecars in record for supernode - " &
575575
$len(sidecars))
576576
else:

tests/test_column_map.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ suite "ColumnMap test suite":
103103
vector[2]
104104

105105
test "supernode test":
106-
for max in ((NUMBER_OF_COLUMNS div 2) + 1) ..< NUMBER_OF_COLUMNS:
106+
for max in (NUMBER_OF_COLUMNS div 2) ..< NUMBER_OF_COLUMNS:
107107
var columns: seq[ColumnIndex]
108108
for i in 0 ..< max:
109109
columns.add(ColumnIndex(i))

0 commit comments

Comments
 (0)