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

Function test_disconnect_half_signed_v2

tests/test_connection.py:628–644  ·  view source on GitHub ↗
(node_factory)

Source from the content-addressed store, hash-verified

626
627@pytest.mark.openchannel('v2')
628def test_disconnect_half_signed_v2(node_factory):
629 # Now, these are the corner cases.
630 # L1 remembers the channel, L2 doesn't
631 disconnects = ['-WIRE_TX_COMPLETE']
632 l1 = node_factory.get_node(disconnect=disconnects)
633 l2 = node_factory.get_node()
634
635 l1.fundwallet(2000000)
636
637 l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
638 with pytest.raises(RpcError):
639 l1.rpc.fundchannel(l2.info['id'], CHANNEL_SIZE)
640
641 # Opener remembers, peer doesn't.
642 wait_for(lambda: l2.rpc.listpeers(l1.info['id'])['peers'] == [])
643 wait_for(lambda: only_one(l1.rpc.listpeers(l2.info['id'])['peers'])['connected'] is False)
644 assert len(l1.rpc.listpeerchannels(l2.info['id'])['channels']) == 1
645
646
647@pytest.mark.openchannel('v1')

Callers

nothing calls this directly

Calls 8

wait_forFunction · 0.90
only_oneFunction · 0.90
fundwalletMethod · 0.80
listpeerchannelsMethod · 0.80
get_nodeMethod · 0.45
connectMethod · 0.45
fundchannelMethod · 0.45
listpeersMethod · 0.45

Tested by

no test coverage detected