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

Function test_opening_crash

tests/test_opening.py:3460–3477  ·  view source on GitHub ↗

Stop transmission of initial funding tx, check it eventually opens

(bitcoind, node_factory)

Source from the content-addressed store, hash-verified

3458@pytest.mark.openchannel('v1')
3459@pytest.mark.openchannel('v2')
3460def test_opening_crash(bitcoind, node_factory):
3461 """Stop transmission of initial funding tx, check it eventually opens"""
3462 l1, l2 = node_factory.get_nodes(2)
3463
3464 def censoring_sendrawtx(r):
3465 return {'id': r['id'], 'result': {}}
3466
3467 l1.daemon.rpcproxy.mock_rpc('sendrawtransaction', censoring_sendrawtx)
3468 l2.daemon.rpcproxy.mock_rpc('sendrawtransaction', censoring_sendrawtx)
3469 l1.fundwallet(3_000_000)
3470 l1.connect(l2)
3471 txid = l1.rpc.fundchannel(l2.info['id'], "2000000sat")['txid']
3472
3473 l1.stop()
3474 l1.daemon.rpcproxy.mock_rpc('sendrawtransaction', None)
3475 l1.start()
3476
3477 bitcoind.generate_block(1, wait_for_mempool=txid)
3478
3479
3480@pytest.mark.openchannel('v1')

Callers

nothing calls this directly

Calls 8

get_nodesMethod · 0.80
mock_rpcMethod · 0.80
fundwalletMethod · 0.80
generate_blockMethod · 0.80
connectMethod · 0.45
fundchannelMethod · 0.45
stopMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected