mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
lightningd: don't explicitly tell connectd to disconnect, have it do it on sending error/warning.
Connectd already does this when we *receive* an error or warning, but now do it on send. This causes some slight behavior change: we don't disconnect when we close a channel, for example (our behaviour here has been inconsistent across versions, depending on the code). When connectd is told to disconnect, it now does so immediately, and doesn't wait for subds to drain etc. That simplifies the manual disconnect case, which now cleans up as it would from any other disconnection when connectd says it's disconnected. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
neil saitug
parent
2962b93199
commit
a3c4908f4a
@@ -117,8 +117,8 @@ def test_max_channel_id(node_factory, bitcoind):
|
||||
l2.wait_for_channel_onchain(l1.info['id'])
|
||||
|
||||
bitcoind.generate_block(101)
|
||||
wait_for(lambda: l1.rpc.listpeers()['peers'] == [])
|
||||
wait_for(lambda: l2.rpc.listpeers()['peers'] == [])
|
||||
wait_for(lambda: only_one(l1.rpc.listpeers()['peers'])['channels'] == [])
|
||||
wait_for(lambda: only_one(l2.rpc.listpeers()['peers'])['channels'] == [])
|
||||
|
||||
# Stop l2, and restart
|
||||
l2.stop()
|
||||
|
||||
Reference in New Issue
Block a user