use unsigned literals (#3717)

in the hopes of avoiding potential for conversion bugs on i386
This commit is contained in:
Jacek Sieka 2022-06-08 13:09:33 +02:00 committed by GitHub
parent 29297e9ce4
commit 7ec1521c52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -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))))

View File

@ -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],
@ -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