fixed super and multi_addr variable name

This commit is contained in:
Alex Haynes 2018-10-21 15:11:27 -04:00
parent f32b0cc3ef
commit 51921fe728
2 changed files with 7 additions and 6 deletions

View File

@ -3,12 +3,13 @@ import asyncio
class Stream(IStream):
def __init__(self, peer_id, maddr):
def __init__(self, peer_id, multi_addr):
IStream.__init__(self, peer_id, multi_addr)
self.peer_id = peer_id
ip = maddr.get_protocol_value("ip4")
port = maddr.get_protocol_value("tcp")
ip = multi_addr.get_protocol_value("ip4")
port = multi_addr.get_protocol_value("tcp")
self.open_connection(ip, port)
async def open_connection(self, ip, port):

View File

@ -2,9 +2,9 @@ from abc import ABC, abstractmethod
class IStream(ABC):
def __init__(self, peer_id, maddr):
def __init__(self, peer_id, multi_addr):
self.peer_id = peer_id
self.maddr = maddr
self.multi_addr = multi_addr
@abstractmethod
def protocol(self):