mirror of
https://github.com/status-im/nim-libp2p.git
synced 2025-02-20 08:38:30 +00:00
fix: remove bad cast on DiscoveryLimit
This commit is contained in:
parent
ea7d6c8b3a
commit
4f3df474cd
@ -568,7 +568,7 @@ proc request*(
|
|||||||
s: Table[PeerId, (PeerRecord, Register)]
|
s: Table[PeerId, (PeerRecord, Register)]
|
||||||
d = Discover(ns: ns)
|
d = Discover(ns: ns)
|
||||||
|
|
||||||
if limit > DiscoverLimit.int:
|
if limit > DiscoverLimit:
|
||||||
raise newException(RendezVousError, "Invalid limit")
|
raise newException(RendezVousError, "Invalid limit")
|
||||||
if ns.len notin 0 .. 255:
|
if ns.len notin 0 .. 255:
|
||||||
raise newException(RendezVousError, "Invalid namespace")
|
raise newException(RendezVousError, "Invalid namespace")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user