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

Function test_reconnect_gossiping

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

Source from the content-addressed store, hash-verified

661@pytest.mark.skip('needs blackhold support')
662@pytest.mark.developer
663def test_reconnect_gossiping(node_factory):
664 # connectd thinks we're still gossiping; peer reconnects.
665 disconnects = ['0INVALID 33333']
666 l1 = node_factory.get_node(may_reconnect=True)
667 l2 = node_factory.get_node(disconnect=disconnects,
668 may_reconnect=True)
669 l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
670 # Make sure l2 knows about l1
671 wait_for(lambda: l2.rpc.listpeers(l1.info['id'])['peers'] != [])
672
673 l2.rpc.sendcustommsg(l1.info['id'], bytes([0x82, 0x35]).hex())
674 wait_for(lambda: l1.rpc.listpeers(l2.info['id'])['peers'] == [])
675
676 l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
677 l2.daemon.wait_for_log('processing now old peer gone')
678
679
680@pytest.mark.developer("needs dev-disconnect")

Callers

nothing calls this directly

Calls 5

wait_forFunction · 0.90
wait_for_logMethod · 0.80
get_nodeMethod · 0.45
connectMethod · 0.45
listpeersMethod · 0.45

Tested by

no test coverage detected