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

Function test_connect_standard_addr

tests/test_connection.py:188–204  ·  view source on GitHub ↗

Test standard node@host:port address

(node_factory)

Source from the content-addressed store, hash-verified

186
187
188def test_connect_standard_addr(node_factory):
189 """Test standard node@host:port address
190 """
191 l1, l2, l3 = node_factory.get_nodes(3)
192
193 # node@host
194 ret = l1.rpc.connect("{}@{}".format(l2.info['id'], 'localhost'), port=l2.port)
195 assert ret['id'] == l2.info['id']
196 assert ret['address'] == {'type': 'ipv4', 'address': '127.0.0.1', 'port': l2.port}
197
198 # node@host:port
199 ret = l1.rpc.connect("{}@localhost:{}".format(l3.info['id'], l3.port))
200 assert ret['id'] == l3.info['id']
201
202 # node@[ipv6]:port --- not supported by our CI
203 # ret = l1.rpc.connect("{}@[::1]:{}".format(l3.info['id'], l3.port))
204 # assert ret['id'] == l3.info['id']
205
206
207def 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