mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-21 22:31:48 +01:00
lightningd: don't even transiently try to connect to private nodes if --dev-no-reconnect-private.
Christian reported that this flag doesn't work on restart. Indeed, it made us attempt *transient* rather than *persistent* connections, but we still told connectd to connect. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Fixed: connectd: `dev-no-reconnect-private` is respected on restart.
This commit is contained in:
parent
b8f7682362
commit
dc60a4ac23
2 changed files with 5 additions and 1 deletions
|
@ -2551,6 +2551,11 @@ static void setup_peer(struct peer *peer)
|
|||
break;
|
||||
}
|
||||
|
||||
/* Don't reconnect for private channels if --dev-no-reconnect-private */
|
||||
if (!channel->peer->ld->reconnect_private
|
||||
&& !(channel->channel_flags & CHANNEL_FLAGS_ANNOUNCE_CHANNEL))
|
||||
continue;
|
||||
|
||||
if (channel_state_wants_peercomms(channel->state))
|
||||
connect = true;
|
||||
if (channel_important_filter(channel, NULL))
|
||||
|
|
|
@ -4756,7 +4756,6 @@ def test_onionmessage_forward_fail(node_factory, bitcoind):
|
|||
l2.daemon.is_in_log('plugin-onionmessage_forward_fail_notification.py: Received onionmessage_forward_fail')
|
||||
|
||||
|
||||
@pytest.mark.xfail(strict=True)
|
||||
def test_private_channel_no_reconnect(node_factory):
|
||||
l1, l2 = node_factory.line_graph(2,
|
||||
announce_channels=False,
|
||||
|
|
Loading…
Add table
Reference in a new issue