mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-18 09:27:05 +00:00
use unsigned literals (#3717)
in the hopes of avoiding potential for conversion bugs on i386
This commit is contained in:
parent
29297e9ce4
commit
7ec1521c52
@ -167,9 +167,9 @@ proc getBlocks*[A, B](man: SyncManager[A, B], peer: A,
|
|||||||
try:
|
try:
|
||||||
let res =
|
let res =
|
||||||
if peer.useSyncV2():
|
if peer.useSyncV2():
|
||||||
await beaconBlocksByRange_v2(peer, req.slot, req.count, 1)
|
await beaconBlocksByRange_v2(peer, req.slot, req.count, 1'u64)
|
||||||
else:
|
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 =
|
proc(blcks: seq[phase0.SignedBeaconBlock]): auto =
|
||||||
blcks.mapIt(newClone(ForkedSignedBeaconBlock.init(it))))
|
blcks.mapIt(newClone(ForkedSignedBeaconBlock.init(it))))
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
{.push raises: [Defect].}
|
{.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 stew/[results, base10], chronos, chronicles
|
||||||
import
|
import
|
||||||
../spec/datatypes/[base, phase0, altair],
|
../spec/datatypes/[base, phase0, altair],
|
||||||
@ -134,8 +134,8 @@ proc checkResponse*[T](req: SyncRequest[T],
|
|||||||
inc(dindex)
|
inc(dindex)
|
||||||
else:
|
else:
|
||||||
return false
|
return false
|
||||||
slot = slot + 1
|
slot += 1'u64
|
||||||
rindex = rindex + 1'u64
|
rindex += 1'u64
|
||||||
|
|
||||||
if dindex == len(data):
|
if dindex == len(data):
|
||||||
return true
|
return true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user