MCPcopy Create free account
hub / github.com/ElementsProject/lightning / test_connect_standard_addr

Function test_connect_standard_addr

tests/test_connection.py:247–263  ·  view source on GitHub ↗

Test standard node@host:port address

(node_factory)

Source from the content-addressed store, hash-verified

245
246
247def test_connect_standard_addr(node_factory):
248 """Test standard node@host:port address
249 """
250 l1, l2, l3 = node_factory.get_nodes(3)
251
252 # node@host
253 ret = l1.rpc.connect("{}@{}".format(l2.info['id'], 'localhost'), port=l2.port)
254 assert ret['id'] == l2.info['id']
255 assert ret['address'] == {'type': 'ipv4', 'address': '127.0.0.1', 'port': l2.port}
256
257 # node@host:port
258 ret = l1.rpc.connect("{}@localhost:{}".format(l3.info['id'], l3.port))
259 assert ret['id'] == l3.info['id']
260
261 # node@[ipv6]:port --- not supported by our CI
262 # ret = l1.rpc.connect("{}@[::1]:{}".format(l3.info['id'], l3.port))
263 # assert ret['id'] == l3.info['id']
264
265
266def test_reconnect_channel_peers(node_factory, executor):

Callers

nothing calls this directly

Calls 2

get_nodesMethod · 0.80
connectMethod · 0.45

Tested by

no test coverage detected