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:
parent
d4dd25d84e
commit
a64567bb4a
10
p2p/kad.py
10
p2p/kad.py
@ -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
|
Loading…
Reference in New Issue
Block a user