diff --git a/tests/test_connection.py b/tests/test_connection.py index d618caccc..dc95b0e3c 100644 --- a/tests/test_connection.py +++ b/tests/test_connection.py @@ -3429,8 +3429,7 @@ def test_feerate_stress(node_factory, executor): assert not l1.daemon.is_in_log('Bad.*signature', start=prev_log) prev_log = len(l1.daemon.logs) - # Make sure it's reconnected, and wait for last payment. - wait_for(lambda: l1.rpc.getpeer(l2.info['id'])['connected']) + # Wait for last payment # We can get TEMPORARY_CHANNEL_FAILURE due to disconnect, too. if l1done != 0: with pytest.raises(RpcError, match='WIRE_INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS|WIRE_TEMPORARY_CHANNEL_FAILURE'): @@ -3438,7 +3437,13 @@ def test_feerate_stress(node_factory, executor): if l2done != 0: with pytest.raises(RpcError, match='WIRE_INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS|WIRE_TEMPORARY_CHANNEL_FAILURE'): l2.rpc.waitsendpay("{:064x}".format(l2done - 1), timeout=TIMEOUT) + + # Make sure it's reconnected, then try adjusting feerates + wait_for(lambda: l1.rpc.getpeer(l2.info['id'])['connected'] and l2.rpc.getpeer(l1.info['id'])['connected']) + l1.rpc.call('dev-feerate', [l2.info['id'], rate - 5]) + time.sleep(1) + assert not l1.daemon.is_in_log('Bad.*signature') assert not l2.daemon.is_in_log('Bad.*signature')