(node_factory, bitcoind, executor)
| 158 | |
| 159 | |
| 160 | def test_closing_disconnected_notify(node_factory, bitcoind, executor): |
| 161 | l1, l2 = node_factory.line_graph(2) |
| 162 | |
| 163 | l1.pay(l2, 200000000) |
| 164 | l2.stop() |
| 165 | # Wait until channeld is definitely gone. |
| 166 | wait_for(lambda: 'owner' not in only_one(l1.rpc.listpeerchannels()['channels'])) |
| 167 | |
| 168 | out = subprocess.check_output(['cli/lightning-cli', |
| 169 | '--network={}'.format(TEST_NETWORK), |
| 170 | '--lightning-dir={}' |
| 171 | .format(l1.daemon.lightning_dir), |
| 172 | 'close', |
| 173 | l2.info['id'], |
| 174 | '5']).decode('utf-8').splitlines() |
| 175 | assert out[0] == '# peer is offline, will negotiate once they reconnect (5 seconds before unilateral close).' |
| 176 | assert out[1] == '# Timed out, forcing close.' |
| 177 | assert not any([line.startswith('#') for line in out[2:]]) |
| 178 | |
| 179 | |
| 180 | def test_closing_id(node_factory): |
nothing calls this directly
no test coverage detected