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

Function test_lockin_between_restart

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

Source from the content-addressed store, hash-verified

2276@pytest.mark.openchannel('v1')
2277@pytest.mark.openchannel('v2')
2278def test_lockin_between_restart(node_factory, bitcoind):
2279 l1 = node_factory.get_node(may_reconnect=True)
2280 l2 = node_factory.get_node(options={'funding-confirms': 3},
2281 may_reconnect=True)
2282 l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
2283
2284 l1.fundwallet(10**6 + 1000000)
2285 l1.rpc.fundchannel(l2.info['id'], 10**6)['tx']
2286
2287 # l1 goes down.
2288 l1.stop()
2289
2290 # Now 120 blocks go by...
2291 bitcoind.generate_block(120)
2292
2293 # Restart
2294 l1.start()
2295
2296 # All should be good.
2297 l1.daemon.wait_for_log(' to CHANNELD_NORMAL')
2298 l2.daemon.wait_for_log(' to CHANNELD_NORMAL')
2299
2300
2301@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