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

Function test_disconnect_half_signed

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

Source from the content-addressed store, hash-verified

607
608@pytest.mark.openchannel('v1')
609def test_disconnect_half_signed(node_factory):
610 # Now, these are the corner cases. Fundee sends funding_signed,
611 # but opener doesn't receive it.
612 disconnects = ['-WIRE_FUNDING_SIGNED']
613 l1 = node_factory.get_node()
614 l2 = node_factory.get_node(disconnect=disconnects)
615
616 l1.fundwallet(2000000)
617
618 l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
619 with pytest.raises(RpcError):
620 l1.rpc.fundchannel(l2.info['id'], CHANNEL_SIZE)
621
622 # Peer remembers, opener doesn't.
623 wait_for(lambda: l1.rpc.listpeers(l2.info['id'])['peers'] == [])
624 assert len(l2.rpc.listpeerchannels(l1.info['id'])['channels']) == 1
625
626
627@pytest.mark.openchannel('v2')

Callers

nothing calls this directly

Calls 7

wait_forFunction · 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