diff --git a/beacon_chain/networking/eth2_network.nim b/beacon_chain/networking/eth2_network.nim index dd549e2ef..7187289ef 100644 --- a/beacon_chain/networking/eth2_network.nim +++ b/beacon_chain/networking/eth2_network.nim @@ -2634,8 +2634,6 @@ proc updateStabilitySubnetMetadata*(node: Eth2Node, attnets: AttnetBits) = debug "Stability subnets changed; updated ENR attnets", attnets proc loadCscnetsMetadata*(node: Eth2Node, cscnets: CscCount) = - if node.metadata.custody_subnet_count == cscnets.uint64: - return node.metadata.custody_subnet_count = cscnets.uint64 diff --git a/beacon_chain/nimbus_beacon_node.nim b/beacon_chain/nimbus_beacon_node.nim index 69dbded16..e57a053de 100644 --- a/beacon_chain/nimbus_beacon_node.nim +++ b/beacon_chain/nimbus_beacon_node.nim @@ -508,6 +508,15 @@ proc initFullNode( quarantine, blobQuarantine, dataColumnQuarantine, rmanBlockVerifier, rmanBlockLoader, rmanBlobLoader, rmanDataColumnLoader) + if node.config.subscribeAllSubnets: + node.network.loadCscnetsMetadata(DATA_COLUMN_SIDECAR_SUBNET_COUNT.uint8) + elif not node.config.subscribeAllSubnets: + let csc = node.config.custodySubnetCount + if csc.isSome and csc.get < DATA_COLUMN_SIDECAR_SUBNET_COUNT: + node.network.loadCscnetsMetadata(csc.get.uint8) + else: + node.network.loadCscnetsMetadata(CUSTODY_REQUIREMENT.uint8) + if node.config.lightClientDataServe: proc scheduleSendingLightClientUpdates(slot: Slot) = if node.lightClientPool[].broadcastGossipFut != nil: @@ -1182,15 +1191,6 @@ proc addDenebMessageHandlers( debugEcho topic node.network.subscribe(topic, basicParams) - if node.config.subscribeAllSubnets: - node.network.loadCscnetsMetadata(DATA_COLUMN_SIDECAR_SUBNET_COUNT.uint8) - elif not node.config.subscribeAllSubnets: - let csc = node.config.custodySubnetCount - if csc.isSome and csc.get < DATA_COLUMN_SIDECAR_SUBNET_COUNT: - node.network.loadCscnetsMetadata(csc.get.uint8) - else: - node.network.loadCscnetsMetadata(CUSTODY_REQUIREMENT.uint8) - proc addElectraMessageHandlers( node: BeaconNode, forkDigest: ForkDigest, slot: Slot) = node.addDenebMessageHandlers(forkDigest, slot)