From 9cad7d6a6a71f13cc7665c295da3c57747ae51c9 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 27 Jul 2022 19:32:32 +0930 Subject: [PATCH] lightningd: don't consider AWAITING_UNILATERAL to be "active". It's not active: we don't want to connect. Signed-off-by: Rusty Russell --- lightningd/channel.h | 1 + tests/test_connection.py | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/lightningd/channel.h b/lightningd/channel.h index a005f8017..4e7f85d46 100644 --- a/lightningd/channel.h +++ b/lightningd/channel.h @@ -467,6 +467,7 @@ static inline bool channel_active(const struct channel *channel) { return channel->state != FUNDING_SPEND_SEEN && channel->state != CLOSINGD_COMPLETE + && channel->state != AWAITING_UNILATERAL && !channel_unsaved(channel) && !channel_on_chain(channel); } diff --git a/tests/test_connection.py b/tests/test_connection.py index ebfb00133..7c4548aea 100644 --- a/tests/test_connection.py +++ b/tests/test_connection.py @@ -4138,7 +4138,6 @@ def test_mutual_reconnect_race(node_factory, executor, bitcoind): l1.rpc.pay(inv['bolt11']) -@pytest.mark.xfail(strict=True, reason="Still connects when AWAITING_UNILATERAL") def test_no_reconnect_awating_unilateral(node_factory, bitcoind): l1, l2 = node_factory.line_graph(2, opts={'may_reconnect': True}) l2.stop()