connectd: do dev_disconnect logic.

As connectd handles more packets itself, or diverts them to/from gossipd,
it's the only place we can implement the dev_disconnect logic.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2022-01-08 23:55:29 +10:30
parent 9c0bb444b7
commit 7a514112ec
17 changed files with 71 additions and 70 deletions

View File

@@ -602,7 +602,8 @@ def test_gossip_no_empty_announcements(node_factory, bitcoind):
# l3 sends CHANNEL_ANNOUNCEMENT to l2, but not CHANNEL_UDPATE.
l1, l2, l3, l4 = node_factory.line_graph(4, opts=[{'log-level': 'io'},
{'log-level': 'io'},
{'disconnect': ['+WIRE_CHANNEL_ANNOUNCEMENT'],
# Writes to l4 first, then l2
{'disconnect': ['+WIRE_CHANNEL_ANNOUNCEMENT*2'],
'may_reconnect': True},
{'may_reconnect': True}],
fundchannel=False)