(node_factory, bitcoind)
| 2294 | @pytest.mark.openchannel('v1') |
| 2295 | @pytest.mark.openchannel('v2') |
| 2296 | def test_funding_while_offline(node_factory, bitcoind): |
| 2297 | l1 = node_factory.get_node() |
| 2298 | addr = l1.rpc.newaddr('bech32')['bech32'] |
| 2299 | sync_blockheight(bitcoind, [l1]) |
| 2300 | |
| 2301 | # l1 goes down. |
| 2302 | l1.stop() |
| 2303 | |
| 2304 | # We send funds |
| 2305 | bitcoind.rpc.sendtoaddress(addr, (10**6 + 1000000) / 10**8) |
| 2306 | |
| 2307 | # Now 120 blocks go by... |
| 2308 | bitcoind.generate_block(120) |
| 2309 | |
| 2310 | # Restart |
| 2311 | l1.start() |
| 2312 | sync_blockheight(bitcoind, [l1]) |
| 2313 | |
| 2314 | assert len(l1.rpc.listfunds()['outputs']) == 1 |
| 2315 | |
| 2316 | |
| 2317 | @pytest.mark.openchannel('v1') |
nothing calls this directly
no test coverage detected