Runnable with both Python3 and Python2, with PyQt4 #2249
|
@ -347,7 +347,7 @@ class BMProto(AdvancedDispatcher, ObjectTracker):
|
||||||
if now < self.skipUntil:
|
if now < self.skipUntil:
|
||||||
return True
|
return True
|
||||||
for i in items:
|
for i in items:
|
||||||
self.pendingUpload[str(i)] = now
|
self.pendingUpload[i] = now
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def _command_inv(self, dandelion=False):
|
def _command_inv(self, dandelion=False):
|
||||||
|
@ -366,7 +366,7 @@ class BMProto(AdvancedDispatcher, ObjectTracker):
|
||||||
if dandelion and not state.dandelion_enabled:
|
if dandelion and not state.dandelion_enabled:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
for i in map(str, items):
|
for i in items:
|
||||||
if i in state.Inventory and not state.Dandelion.hasHash(i):
|
if i in state.Inventory and not state.Dandelion.hasHash(i):
|
||||||
continue
|
continue
|
||||||
if dandelion and not state.Dandelion.hasHash(i):
|
if dandelion and not state.Dandelion.hasHash(i):
|
||||||
|
@ -456,11 +456,10 @@ class BMProto(AdvancedDispatcher, ObjectTracker):
|
||||||
"""Incoming addresses, process them"""
|
"""Incoming addresses, process them"""
|
||||||
# not using services
|
# not using services
|
||||||
for seenTime, stream, _, ip, port in self._decode_addr():
|
for seenTime, stream, _, ip, port in self._decode_addr():
|
||||||
ip = str(ip)
|
|
||||||
if (
|
if (
|
||||||
stream not in network.connectionpool.pool.streams
|
stream not in network.connectionpool.pool.streams
|
||||||
# FIXME: should check against complete list
|
# FIXME: should check against complete list
|
||||||
or ip.startswith('bootstrap')
|
or ip.decode("utf-8", "replace").startswith('bootstrap')
|
||||||
):
|
):
|
||||||
continue
|
continue
|
||||||
decodedIP = protocol.checkIPAddress(ip)
|
decodedIP = protocol.checkIPAddress(ip)
|
||||||
|
|
Reference in New Issue
Block a user