mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
pytest: work around dualopend issue.
Dualopend is not listening to the peer fd when it hangs up, so doesn't notice it's gone. We don't clean up the channel until it's done (usually a good thing: it could be about to lock it in), but this harms us here. Fix the test failure and make a comment. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
neil saitug
parent
a08728497b
commit
099d149104
@@ -1391,6 +1391,10 @@ def test_funding_v2_corners(node_factory, bitcoind):
|
||||
|
||||
# Disconnect peer.
|
||||
l1.rpc.disconnect(l2.info['id'], force=True)
|
||||
# FIXME: dualopend doesn't notice that connectd has closed peer conn
|
||||
# (until we reconnect!)
|
||||
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
|
||||
l1.rpc.disconnect(l2.info['id'])
|
||||
wait_for(lambda: len(l1.rpc.listpeers()['peers']) == 0)
|
||||
|
||||
with pytest.raises(RpcError, match=r'Unknown channel'):
|
||||
|
||||
Reference in New Issue
Block a user