(node_factory, bitcoind)
| 2269 | @pytest.mark.openchannel('v1') |
| 2270 | @pytest.mark.openchannel('v2') |
| 2271 | def test_lockin_between_restart(node_factory, bitcoind): |
| 2272 | l1 = node_factory.get_node(may_reconnect=True) |
| 2273 | l2 = node_factory.get_node(options={'funding-confirms': 3}, |
| 2274 | may_reconnect=True) |
| 2275 | l1.rpc.connect(l2.info['id'], 'localhost', l2.port) |
| 2276 | |
| 2277 | l1.fundwallet(10**6 + 1000000) |
| 2278 | l1.rpc.fundchannel(l2.info['id'], 10**6)['tx'] |
| 2279 | |
| 2280 | # l1 goes down. |
| 2281 | l1.stop() |
| 2282 | |
| 2283 | # Now 120 blocks go by... |
| 2284 | bitcoind.generate_block(120) |
| 2285 | |
| 2286 | # Restart |
| 2287 | l1.start() |
| 2288 | |
| 2289 | # All should be good. |
| 2290 | l1.daemon.wait_for_log(' to CHANNELD_NORMAL') |
| 2291 | l2.daemon.wait_for_log(' to CHANNELD_NORMAL') |
| 2292 | |
| 2293 | |
| 2294 | @pytest.mark.openchannel('v1') |
nothing calls this directly
no test coverage detected