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

Function test_remote_disconnect

tests/test_connection.py:478–486  ·  view source on GitHub ↗
(node_factory)

Source from the content-addressed store, hash-verified

476
477
478def test_remote_disconnect(node_factory):
479 l1, l2 = node_factory.get_nodes(2)
480
481 l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
482 wait_for(lambda: l2.rpc.listpeers()['peers'] != [])
483 l2.rpc.disconnect(l1.info['id'])
484
485 # l1 should notice!
486 wait_for(lambda: l1.rpc.listpeers()['peers'] == [])
487
488
489@pytest.mark.developer

Callers

nothing calls this directly

Calls 5

wait_forFunction · 0.90
get_nodesMethod · 0.80
connectMethod · 0.45
listpeersMethod · 0.45
disconnectMethod · 0.45

Tested by

no test coverage detected