lightningd: don't consider AWAITING_UNILATERAL to be "active".

It's not active: we don't want to connect.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2022-07-27 19:32:32 +09:30
parent a259698906
commit 9cad7d6a6a
2 changed files with 1 additions and 1 deletions

View File

@ -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);
}

View File

@ -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()