fix: remove bad cast on DiscoveryLimit

This commit is contained in:
Ludovic Chenut 2024-10-03 16:46:49 +02:00
parent ea7d6c8b3a
commit 4f3df474cd
No known key found for this signature in database
GPG Key ID: D9A59B1907F1D50C
1 changed files with 1 additions and 1 deletions

View File

@ -568,7 +568,7 @@ proc request*(
s: Table[PeerId, (PeerRecord, Register)]
d = Discover(ns: ns)
if limit > DiscoverLimit.int:
if limit > DiscoverLimit:
raise newException(RendezVousError, "Invalid limit")
if ns.len notin 0 .. 255:
raise newException(RendezVousError, "Invalid namespace")