fix: initial subscription condition

This commit is contained in:
Agnish Ghosh 2024-08-22 15:23:37 +05:30
parent 2805ffe242
commit 46c72d8cbe

View File

@ -2040,8 +2040,14 @@ proc installMessageValidators(node: BeaconNode) =
# MsgSource.gossip, blobSidecar, subnet_id)))
# data_column_sidecar_{subnet_id}
#
for it in 0'u64..<DATA_COLUMN_SIDECAR_SUBNET_COUNT:
#
let subnetCount =
if node.config.subscribeAllSubnets:
DATA_COLUMN_SIDECAR_SUBNET_COUNT.uint64
else:
CUSTODY_REQUIREMENT.uint64
for it in 0'u64 ..< subnetCount:
closureScope: # Needed for inner `proc`; don't lift it out of loop.
let subnet_id = it
node.network.addValidator(