basic-host and remove context

This commit is contained in:
zixuanzh
2018-10-21 12:55:45 -04:00
parent 5fd7cbe0eb
commit 9e64202e5c
7 changed files with 19 additions and 29 deletions

View File

@ -2,8 +2,7 @@ from abc import ABC, abstractmethod
class INetwork(ABC):
def __init__(self, context, my_peer_id, peer_store):
self.context = context
def __init__(self, my_peer_id, peer_store):
self.my_peer_id = my_peer_id
self.peer_store = peer_store
@ -16,9 +15,8 @@ class INetwork(ABC):
pass
@abstractmethod
def new_stream(self, context, peer_id):
def new_stream(self, peer_id):
"""
:param context: context instance
:param peer_id: peer_id of destination
:return: stream instance
"""