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

Function test_disconnect_half_signed

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

Source from the content-addressed store, hash-verified

563@pytest.mark.openchannel('v1')
564@pytest.mark.openchannel('v2')
565def test_disconnect_half_signed(node_factory):
566 # Now, these are the corner cases. Fundee sends funding_signed,
567 # but opener doesn't receive it.
568 disconnects = ['-WIRE_FUNDING_SIGNED']
569 if EXPERIMENTAL_DUAL_FUND:
570 disconnects = ['-WIRE_COMMITMENT_SIGNED']
571 l1 = node_factory.get_node()
572 l2 = node_factory.get_node(disconnect=disconnects)
573
574 l1.fundwallet(2000000)
575
576 l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
577 with pytest.raises(RpcError):
578 l1.rpc.fundchannel(l2.info['id'], 25000)
579
580 # Peer remembers, opener doesn't.
581 wait_for(lambda: l1.rpc.listpeers(l2.info['id'])['peers'] == [])
582 assert len(only_one(l2.rpc.listpeers(l1.info['id'])['peers'])['channels']) == 1
583
584
585@pytest.mark.developer

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected