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

Function test_zero_locktime_blocks

tests/test_misc.py:5345–5356  ·  view source on GitHub ↗

Ensure our node "works" even if locktime set to 0.

(node_factory, bitcoind)

Source from the content-addressed store, hash-verified

5343
5344
5345def test_zero_locktime_blocks(node_factory, bitcoind):
5346 """Ensure our node "works" even if locktime set to 0."""
5347 l1, l2, l3 = node_factory.line_graph(3, opts=[{}, {'watchtime-blocks': 0}, {}], wait_for_announce=True)
5348
5349 # We should be able to use the channel and close it.
5350 inv = l3.rpc.invoice(10000, 'test_zero_locktime_blocks', 'test_zero_locktime_blocks')
5351 l1.rpc.xpay(inv['bolt11'])
5352
5353 l1.rpc.close(l2.info['id'])
5354 l2.rpc.close(l3.info['id'])
5355 bitcoind.generate_block(1, wait_for_mempool=2)
5356 sync_blockheight(bitcoind, [l1, l2, l3])
5357
5358
5359def test_filter_with_invalid_json(node_factory):

Callers

nothing calls this directly

Calls 6

sync_blockheightFunction · 0.90
line_graphMethod · 0.80
generate_blockMethod · 0.80
invoiceMethod · 0.45
xpayMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected