MCPcopy Create free account
hub / github.com/ElementsProject/lightning / test_lockin_between_restart

Function test_lockin_between_restart

tests/test_connection.py:2271–2291  ·  view source on GitHub ↗
(node_factory, bitcoind)

Source from the content-addressed store, hash-verified

2269@pytest.mark.openchannel('v1')
2270@pytest.mark.openchannel('v2')
2271def 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')

Callers

nothing calls this directly

Calls 8

fundwalletMethod · 0.80
generate_blockMethod · 0.80
wait_for_logMethod · 0.80
get_nodeMethod · 0.45
connectMethod · 0.45
fundchannelMethod · 0.45
stopMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected