Changeset View
Changeset View
Standalone View
Standalone View
test/functional/test_framework/test_node.py
Show First 20 Lines • Show All 334 Lines • ▼ Show 20 Lines | def add_p2p_connection(self, p2p_conn, *args, **kwargs): | ||||
This method adds the p2p connection to the self.p2ps list and also | This method adds the p2p connection to the self.p2ps list and also | ||||
returns the connection to the caller.""" | returns the connection to the caller.""" | ||||
if 'dstport' not in kwargs: | if 'dstport' not in kwargs: | ||||
kwargs['dstport'] = p2p_port(self.index) | kwargs['dstport'] = p2p_port(self.index) | ||||
if 'dstaddr' not in kwargs: | if 'dstaddr' not in kwargs: | ||||
kwargs['dstaddr'] = '127.0.0.1' | kwargs['dstaddr'] = '127.0.0.1' | ||||
p2p_conn.peer_connect(*args, **kwargs) | p2p_conn.peer_connect(*args, **kwargs)() | ||||
self.p2ps.append(p2p_conn) | self.p2ps.append(p2p_conn) | ||||
return p2p_conn | return p2p_conn | ||||
@property | @property | ||||
def p2p(self): | def p2p(self): | ||||
"""Return the first p2p connection | """Return the first p2p connection | ||||
▲ Show 20 Lines • Show All 86 Lines • Show Last 20 Lines |