mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-31 16:58:31 +00:00
turned CscCount to uint8 according to the latest EF spec
This commit is contained in:
parent
e87871e2cb
commit
c2962b65c9
@ -1550,7 +1550,7 @@ proc getLowSubnets(node: Eth2Node, epoch: Epoch):
|
||||
findLowSubnets(getSyncCommitteeTopic, SyncSubcommitteeIndex, SYNC_COMMITTEE_SUBNET_COUNT)
|
||||
else:
|
||||
default(SyncnetBits),
|
||||
findLowSubnets(getDataColumnSidecarTopic, uint64, DATA_COLUMN_SIDECAR_SUBNET_COUNT.int).countOnes.uint64
|
||||
findLowSubnets(getDataColumnSidecarTopic, uint64, DATA_COLUMN_SIDECAR_SUBNET_COUNT.int).countOnes.uint8
|
||||
)
|
||||
|
||||
proc runDiscoveryLoop(node: Eth2Node) {.async.} =
|
||||
@ -2598,7 +2598,7 @@ proc updateStabilitySubnetMetadata*(node: Eth2Node, attnets: AttnetBits) =
|
||||
else:
|
||||
debug "Stability subnets changed; updated ENR attnets", attnets
|
||||
|
||||
proc loadCscnetsMetadata*(node: Eth2Node, cscnets: uint64) =
|
||||
proc loadCscnetsMetadata*(node: Eth2Node, cscnets: CscCount) =
|
||||
if node.metadata.custody_subnet_count == cscnets:
|
||||
return
|
||||
|
||||
|
@ -1154,13 +1154,13 @@ proc addDenebMessageHandlers(
|
||||
node.network.subscribe(topic, basicParams)
|
||||
|
||||
if node.config.subscribeAllSubnets:
|
||||
node.network.loadCscnetsMetadata(DATA_COLUMN_SIDECAR_SUBNET_COUNT.uint64)
|
||||
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.uint64)
|
||||
node.network.loadCscnetsMetadata(csc.get.uint8)
|
||||
else:
|
||||
node.network.loadCscnetsMetadata(CUSTODY_REQUIREMENT.uint64)
|
||||
node.network.loadCscnetsMetadata(CUSTODY_REQUIREMENT.uint8)
|
||||
|
||||
proc addElectraMessageHandlers(
|
||||
node: BeaconNode, forkDigest: ForkDigest, slot: Slot) =
|
||||
|
@ -77,7 +77,7 @@ type
|
||||
column_index*: ColumnIndex
|
||||
row_index*: RowIndex
|
||||
|
||||
CscCount* = uint64
|
||||
CscCount* = uint8
|
||||
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.4/specs/_features/eip7594/p2p-interface.md#metadata
|
||||
MetaData* = object
|
||||
|
Loading…
x
Reference in New Issue
Block a user