Skip to content

Commit

Permalink
pytest: work around dualopend issue.
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
rustyrussell authored and niftynei committed Jul 19, 2022
1 parent a087284 commit 099d149
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'):
Expand Down

0 comments on commit 099d149

Please sign in to comment.