(node_factory)
| 2322 | |
| 2323 | @pytest.mark.developer("gossip without DEVELOPER=1 is slow") |
| 2324 | def test_channel_reenable(node_factory): |
| 2325 | l1, l2 = node_factory.line_graph(2, opts={'may_reconnect': True}, fundchannel=True, wait_for_announce=True) |
| 2326 | |
| 2327 | l1.daemon.wait_for_log('Received node_announcement for node {}'.format(l2.info['id'])) |
| 2328 | l2.daemon.wait_for_log('Received node_announcement for node {}'.format(l1.info['id'])) |
| 2329 | |
| 2330 | # Both directions should be active before the restart |
| 2331 | wait_for(lambda: [c['active'] for c in l1.rpc.listchannels()['channels']] == [True, True]) |
| 2332 | |
| 2333 | # Restart l2, will cause l1 to reconnect |
| 2334 | l2.stop() |
| 2335 | wait_for(lambda: [c['active'] for c in l1.rpc.listchannels()['channels']] == [False, False]) |
| 2336 | l2.start() |
| 2337 | |
| 2338 | # Updates may be suppressed if redundant; just test results. |
| 2339 | wait_for(lambda: [c['active'] for c in l1.rpc.listchannels()['channels']] == [True, True]) |
| 2340 | wait_for(lambda: [c['active'] for c in l2.rpc.listchannels()['channels']] == [True, True]) |
| 2341 | |
| 2342 | |
| 2343 | @pytest.mark.developer |
nothing calls this directly
no test coverage detected