connecting open_stream to stream constructor

This commit is contained in:
Alex Haynes
2018-11-11 11:52:26 -05:00
parent 7d4227f269
commit 65fe2e400e
3 changed files with 14 additions and 7 deletions

View File

@ -6,7 +6,7 @@ class Swarm(INetwork):
def __init__(self, my_peer_id, peerstore):
self.my_peer_id = my_peer_id
self.peer_store = peer_store
self.peer_store = peerstore
self.connections = {}
def set_stream_handler(self, stream_handler):
@ -41,7 +41,7 @@ class Swarm(INetwork):
muxed_connection = MuxedConnection(conn, True)
else:
raise Exception("No IP and port in addr")
return muxed_connection.open_stream(protocol_id, "")
return muxed_connection.open_stream(protocol_id, "", peer_id, addrs)
def listen(self, *args):
"""