From 700360fde2cf91c0c6d66af42851ee21c947e23a Mon Sep 17 00:00:00 2001 From: Kim De Mey Date: Tue, 31 Oct 2023 18:28:21 +0100 Subject: [PATCH] Rename routing_table_nodes metric for discv4 routing table (#646) --- eth/p2p/discoveryv5/routing_table.nim | 2 +- eth/p2p/kademlia.nim | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eth/p2p/discoveryv5/routing_table.nim b/eth/p2p/discoveryv5/routing_table.nim index a3876e7..13dd7e2 100644 --- a/eth/p2p/discoveryv5/routing_table.nim +++ b/eth/p2p/discoveryv5/routing_table.nim @@ -16,7 +16,7 @@ import export results -declarePublicGauge routing_table_nodes, +declareGauge routing_table_nodes, "Discovery routing table nodes", labels = ["state"] type diff --git a/eth/p2p/kademlia.nim b/eth/p2p/kademlia.nim index e4a9741..c22be30 100644 --- a/eth/p2p/kademlia.nim +++ b/eth/p2p/kademlia.nim @@ -15,8 +15,8 @@ import export sets # TODO: This should not be needed, but compilation fails otherwise -declarePublicGauge routing_table_nodes, - "Discovery routing table nodes" +declareGauge discv4_routing_table_nodes, + "Discovery v4 routing table nodes" logScope: topics = "eth p2p kademlia" @@ -221,7 +221,7 @@ proc add(k: KBucket, n: Node): Node = k.nodes.add(n) elif k.len < BUCKET_SIZE: k.nodes.add(n) - routing_table_nodes.inc() + discv4_routing_table_nodes.inc() else: k.replacementCache.add(n) return k.head @@ -230,7 +230,7 @@ proc add(k: KBucket, n: Node): Node = proc removeNode(k: KBucket, n: Node) = let i = k.nodes.find(n) if i != -1: - routing_table_nodes.dec() + discv4_routing_table_nodes.dec() k.nodes.delete(i) proc split(k: KBucket): tuple[lower, upper: KBucket] =