From 02d68086e94a75252a6845a7d13845d90bbf185f Mon Sep 17 00:00:00 2001
From: Moul <moul@moul.re>
Date: Fri, 9 Sep 2016 17:46:56 +0200
Subject: [PATCH] [mod] #265: check nodes are unique with endpoints.

---
 src/sakia/core/net/network.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/sakia/core/net/network.py b/src/sakia/core/net/network.py
index eec21ff4..bdf53c8e 100644
--- a/src/sakia/core/net/network.py
+++ b/src/sakia/core/net/network.py
@@ -270,14 +270,14 @@ class Network(QObject):
 
     def _check_nodes_unique(self):
         """
-        Check that all nodes are unique by them pubkeys
+        Check that all nodes are unique by they endpoints
         """
-        pubkeys = set()
+        endpoints = set()
         unique_nodes = []
         for n in self.nodes:
-            if n.pubkey not in pubkeys:
+            if n.endpoint not in endpoints:
                 unique_nodes.append(n)
-                pubkeys.add(n.pubkey)
+                endpoints.add(n.endpoint)
 
         self._nodes = unique_nodes
 
-- 
GitLab