Skip to content
Snippets Groups Projects
Commit 7ff1847a authored by inso's avatar inso
Browse files

Clear nodes not using the same currency from the peers

parent 4ca242f8
No related branches found
No related tags found
No related merge requests found
......@@ -22,7 +22,7 @@ class Community(object):
A community is a group of nodes using the same currency.
'''
self.currency = currency
self.peers = peers
self.peers = [p for p in peers if p.currency == currency]
self.requests_cache = {}
self.last_block = None
......@@ -30,6 +30,7 @@ class Community(object):
# we refresh its peers tree
found_peers = self.peering()
for p in found_peers:
logging.debug(p.currency)
if p.pubkey not in [peer.pubkey for peer in peers]:
self.peers.append(p)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment