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

Function test_close_twice

tests/test_closing.py:4051–4066  ·  view source on GitHub ↗
(node_factory, executor)

Source from the content-addressed store, hash-verified

4049
4050
4051def test_close_twice(node_factory, executor):
4052 # First feerate is too low, second fixes it.
4053 l1, l2 = node_factory.line_graph(2, opts={'allow_warning': True,
4054 'may_reconnect': True,
4055 'feerates': (15000, 15000, 15000, 15000)})
4056
4057 # This makes it disconnect, since feerate is too low.
4058 fut = executor.submit(l1.rpc.close, l2.info['id'], feerange=['253perkw', '500perkw'])
4059 l1.daemon.wait_for_log('WARNING.*Unable to agree on a feerate')
4060
4061 fut2 = executor.submit(l1.rpc.close, l2.info['id'], feerange=['253perkw', '15000perkw'])
4062
4063 # Now reconnect, it should work.
4064 l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
4065 assert fut.result(TIMEOUT)['type'] == 'mutual'
4066 assert fut2.result(TIMEOUT)['type'] == 'mutual'
4067
4068
4069def test_close_weight_estimate(node_factory, bitcoind):

Callers

nothing calls this directly

Calls 3

line_graphMethod · 0.80
wait_for_logMethod · 0.80
connectMethod · 0.45

Tested by

no test coverage detected