mirror of
https://github.com/ComradCollective/Comrad
synced 2024-11-05 21:20:51 +00:00
server running continuously now. true p2p!
This commit is contained in:
parent
27bb44767c
commit
7ea1fdf034
@ -88,7 +88,7 @@ class Api(object):
|
||||
# self.root.ids.btn1.trigger_action()
|
||||
|
||||
i += 1
|
||||
await asyncio.sleep(2)
|
||||
await asyncio.sleep(10)
|
||||
except asyncio.CancelledError as e:
|
||||
self.log('Wasting time was canceled', e)
|
||||
finally:
|
||||
|
@ -7,8 +7,8 @@ from itertools import chain
|
||||
from collections import OrderedDict
|
||||
from kademlia.utils import shared_prefix, bytes_to_bit_string
|
||||
|
||||
EXCLUDE_PORTS = {5637}
|
||||
# EXCLUDE_PORTS = {}
|
||||
# EXCLUDE_PORTS = {5637}
|
||||
EXCLUDE_PORTS = {}
|
||||
|
||||
class KBucket:
|
||||
def __init__(self, rangeLower, rangeUpper, ksize, replacementNodeFactor=5):
|
||||
@ -190,7 +190,7 @@ class RoutingTable:
|
||||
for neighbor in TableTraverser(self, node):
|
||||
notexcluded = exclude is None or not neighbor.same_home_as(exclude)
|
||||
notexcluded_port = exclude_ports is None or neighbor.port not in exclude_ports
|
||||
print('EXCLUDING_PORTS',notexcluded_port,exclude_ports)
|
||||
#print('EXCLUDING_PORTS',notexcluded_port,exclude_ports)
|
||||
if neighbor.id != node.id and notexcluded:
|
||||
heapq.heappush(nodes, (node.distance_to(neighbor), neighbor))
|
||||
if len(nodes) == k:
|
||||
|
Loading…
Reference in New Issue
Block a user