2
0
mirror of https://github.com/ComradCollective/Comrad synced 2024-11-05 21:20:51 +00:00

back to normal server?

This commit is contained in:
quadrismegistus 2020-08-19 13:15:35 +01:00
parent d4dd25d84e
commit a64567bb4a

View File

@ -177,8 +177,9 @@ class KadProtocol(KademliaProtocol):
return result
class KadServer(Server):
protocol_class = KademliaProtocol # KadProtocol #KademliaProtocol
protocol_class = KadProtocol # KadProtocol #KademliaProtocol
def __init__(self, *x, **y):
super().__init__(*x,**y)
@ -265,4 +266,9 @@ class KadServer(Server):
self.storage[dkey] = value
results = [self.protocol.call_store(n, dkey, value) for n in nodes]
# return true only if at least one store call succeeded
return any(await asyncio.gather(*results))
return any(await asyncio.gather(*results))
#### NEVERMIND
KadServer = Server