mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
connecting open_stream to stream constructor
This commit is contained in:
@ -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):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user