libp2p end to end test

This commit is contained in:
Robert Zajac
2018-11-11 12:36:15 -05:00
parent 7d4227f269
commit 4681e1e08d
5 changed files with 43 additions and 5 deletions

View File

@ -10,6 +10,7 @@ class BasicHost(IHost):
# default options constructor
def __init__(self, _network):
self.network = _network
self.peerstore = self.network.peerstore
# self.stream_handlers = {}
def get_id(self):
@ -24,6 +25,11 @@ class BasicHost(IHost):
"""
return self.network
def get_peerstore(self):
"""
:return: peerstore of the host (same one as in its network instance)
"""
def get_mux(self):
"""
:return: mux instance of host