(node_factory)
| 2427 | |
| 2428 | |
| 2429 | def test_channel_reenable(node_factory): |
| 2430 | l1, l2 = node_factory.line_graph(2, opts={'may_reconnect': True}, fundchannel=True, wait_for_announce=True) |
| 2431 | |
| 2432 | l1.daemon.wait_for_log('Received node_announcement for node {}'.format(l2.info['id'])) |
| 2433 | l2.daemon.wait_for_log('Received node_announcement for node {}'.format(l1.info['id'])) |
| 2434 | |
| 2435 | # Both directions should be active before the restart |
| 2436 | wait_for(lambda: [c['active'] for c in l1.rpc.listchannels()['channels']] == [True, True]) |
| 2437 | |
| 2438 | # Restart l2, will cause l1 to reconnect |
| 2439 | l2.stop() |
| 2440 | wait_for(lambda: [c['peer_connected'] for c in l1.rpc.listpeerchannels()['channels']] == [False]) |
| 2441 | l2.start() |
| 2442 | |
| 2443 | # Updates may be suppressed if redundant; just test results. |
| 2444 | wait_for(lambda: [c['active'] for c in l1.rpc.listchannels()['channels']] == [True, True]) |
| 2445 | wait_for(lambda: [c['peer_connected'] for c in l1.rpc.listpeerchannels()['channels']] == [True]) |
| 2446 | wait_for(lambda: [c['active'] for c in l2.rpc.listchannels()['channels']] == [True, True]) |
| 2447 | wait_for(lambda: [c['peer_connected'] for c in l2.rpc.listpeerchannels()['channels']] == [True]) |
| 2448 | |
| 2449 | |
| 2450 | def test_update_fee(node_factory, bitcoind): |
nothing calls this directly
no test coverage detected