connectd: tell lightningd when disconnect is complete.

This avoids races in our tests where we assume it's sync (and is kind
of nicer).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2022-03-23 06:56:30 +10:30
parent 6cc9f37cab
commit deecedb033
12 changed files with 83 additions and 20 deletions

View File

@@ -1303,7 +1303,7 @@ def test_reserve_enforcement(node_factory, executor):
'Peer transient failure in CHANNELD_NORMAL: channeld.*'
' CHANNEL_ERR_CHANNEL_CAPACITY_EXCEEDED'
)
assert only_one(l1.rpc.listpeers()['peers'])['connected'] is False
wait_for(lambda: only_one(l1.rpc.listpeers()['peers'])['connected'] is False)
def test_ipv4_and_ipv6(node_factory):