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

Function test_lockin_between_restart

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

Source from the content-addressed store, hash-verified

2165@pytest.mark.openchannel('v1')
2166@pytest.mark.openchannel('v2')
2167def test_lockin_between_restart(node_factory, bitcoind):
2168 l1 = node_factory.get_node(may_reconnect=True)
2169 l2 = node_factory.get_node(options={'funding-confirms': 3},
2170 may_reconnect=True)
2171 l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
2172
2173 l1.fundwallet(10**6 + 1000000)
2174 l1.rpc.fundchannel(l2.info['id'], 10**6)['tx']
2175
2176 # l1 goes down.
2177 l1.stop()
2178
2179 # Now 120 blocks go by...
2180 bitcoind.generate_block(120)
2181
2182 # Restart
2183 l1.start()
2184
2185 # All should be good.
2186 l1.daemon.wait_for_log(' to CHANNELD_NORMAL')
2187 l2.daemon.wait_for_log(' to CHANNELD_NORMAL')
2188
2189
2190@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