Skip to content

Commit

Permalink
use unsigned literals (#3717)
Browse files Browse the repository at this point in the history
in the hopes of avoiding potential for conversion bugs on i386
  • Loading branch information
arnetheduck authored Jun 8, 2022
1 parent 29297e9 commit 7ec1521
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions beacon_chain/sync/sync_manager.nim
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ proc getBlocks*[A, B](man: SyncManager[A, B], peer: A,
try:
let res =
if peer.useSyncV2():
await beaconBlocksByRange_v2(peer, req.slot, req.count, 1)
await beaconBlocksByRange_v2(peer, req.slot, req.count, 1'u64)
else:
(await beaconBlocksByRange(peer, req.slot, req.count, 1)).map(
(await beaconBlocksByRange(peer, req.slot, req.count, 1'u64)).map(
proc(blcks: seq[phase0.SignedBeaconBlock]): auto =
blcks.mapIt(newClone(ForkedSignedBeaconBlock.init(it))))

Expand Down
6 changes: 3 additions & 3 deletions beacon_chain/sync/sync_queue.nim
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

{.push raises: [Defect].}

import std/[options, heapqueue, tables, strutils, sequtils, math, algorithm]
import std/[options, heapqueue, tables, strutils, sequtils, math]
import stew/[results, base10], chronos, chronicles
import
../spec/datatypes/[base, phase0, altair],
Expand Down Expand Up @@ -134,8 +134,8 @@ proc checkResponse*[T](req: SyncRequest[T],
inc(dindex)
else:
return false
slot = slot + 1
rindex = rindex + 1'u64
slot += 1'u64
rindex += 1'u64

if dindex == len(data):
return true
Expand Down

0 comments on commit 7ec1521

Please sign in to comment.