revert Csc to big endian uint64

This commit is contained in:
Agnish Ghosh 2024-09-09 02:27:59 +05:30
parent 4a006b5584
commit d461d3f25f
1 changed files with 3 additions and 3 deletions

View File

@ -1562,8 +1562,8 @@ proc runDiscoveryLoop(node: Eth2Node) {.async.} =
(wantedAttnets, wantedSyncnets, wantedCscnets) = node.getLowSubnets(currentEpoch) (wantedAttnets, wantedSyncnets, wantedCscnets) = node.getLowSubnets(currentEpoch)
wantedAttnetsCount = wantedAttnets.countOnes() wantedAttnetsCount = wantedAttnets.countOnes()
wantedSyncnetsCount = wantedSyncnets.countOnes() wantedSyncnetsCount = wantedSyncnets.countOnes()
wantedCscnetsCount = wantedCscnets.countOnes() wantedCscnetsCount = wantedCscnets.countOnes().uint64()
wantedCscnetsUint = wantedCscnetsCount.uint8 wantedCscnetsBEBytes = wantedCscnetsCount.toBytesBE()
outgoingPeers = node.peerPool.lenCurrent({PeerType.Outgoing}) outgoingPeers = node.peerPool.lenCurrent({PeerType.Outgoing})
targetOutgoingPeers = max(node.wantedPeers div 10, 3) targetOutgoingPeers = max(node.wantedPeers div 10, 3)
@ -1581,7 +1581,7 @@ proc runDiscoveryLoop(node: Eth2Node) {.async.} =
node.discoveryForkId, node.discoveryForkId,
wantedAttnets, wantedAttnets,
wantedSyncnets, wantedSyncnets,
wantedCscnetsUint, uint64.fromBytesBE(wantedCscnetsBEBytes),
minScore) minScore)
let newPeers = block: let newPeers = block: