Skip to content

Commit

Permalink
pytest: fix assumption in test_rbf_reconnect_tx_construct that we dis…
Browse files Browse the repository at this point in the history
…connect instantly.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
rustyrussell committed Jul 14, 2022
1 parent ed9dc32 commit f32d27b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_opening.py
Original file line number Diff line number Diff line change
Expand Up @@ -653,14 +653,15 @@ def test_rbf_reconnect_tx_construct(node_factory, bitcoind, chainparams):
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
with pytest.raises(RpcError):
l1.rpc.openchannel_bump(chan_id, chan_amount, initpsbt['psbt'])
assert l1.rpc.getpeer(l2.info['id']) is not None
wait_for(lambda: l1.rpc.getpeer(l2.info['id'])['connected'] is False)

# Now we finish off the completes failure check
for d in disconnects[-2:]:
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
bump = l1.rpc.openchannel_bump(chan_id, chan_amount, initpsbt['psbt'])
with pytest.raises(RpcError):
update = l1.rpc.openchannel_update(chan_id, bump['psbt'])
wait_for(lambda: l1.rpc.getpeer(l2.info['id'])['connected'] is False)

# Now we succeed
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
Expand Down

0 comments on commit f32d27b

Please sign in to comment.