Dandelion fixes

- in route selector, some connections may not have the services
attribute (yet)
- Addresses #1049
This commit is contained in:
Peter Šurda 2017-09-25 09:17:15 +02:00
parent d574b167d8
commit 9923d288e0
Signed by: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -61,10 +61,13 @@ class BMConnectionPool(object):
for i in connections:
if i == node:
continue
try:
if i.services | protocol.NODE_DANDELION:
peers.append(i)
if len(peers) == 2:
break
except AttributeError:
continue
return peers
def connectToStream(self, streamNumber):