From 4f3df474cdd0a17c3b2ae3b2dff37adc84eea702 Mon Sep 17 00:00:00 2001 From: Ludovic Chenut Date: Thu, 3 Oct 2024 16:46:49 +0200 Subject: [PATCH] fix: remove bad cast on DiscoveryLimit --- libp2p/protocols/rendezvous.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libp2p/protocols/rendezvous.nim b/libp2p/protocols/rendezvous.nim index 35f1416727..e4c2d84eab 100644 --- a/libp2p/protocols/rendezvous.nim +++ b/libp2p/protocols/rendezvous.nim @@ -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")