From 380f808e503cc4d0e8e1fc531454ef170ac260c6 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Fri, 8 Jan 2021 17:52:27 +0100 Subject: [PATCH] Merge hazelnuts that have the same id --- squinnondation/peers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/squinnondation/peers.py b/squinnondation/peers.py index c537e9f..90c2a54 100644 --- a/squinnondation/peers.py +++ b/squinnondation/peers.py @@ -943,6 +943,8 @@ class User(Peer): if other_peer.id == peer.id > 0 and other_peer != peer: # The peer with the same id is known as a different address. We merge everything peer.merge(other_peer) + for other_addr in peer.addresses: + self.neighbours[other_addr] = peer self.data_lock.release()