mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
connectd: hold peer until we're interested.
Either because lightningd tells us it wants to talk, or because the peer says something about a channel. We also introduce a behavior change: we disconnect after a failed open. We might want to modify this later, but we it's a side-effect of openingd not holding onto idle connections. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -3448,7 +3448,8 @@ def test_you_forgot_closed_channel(node_factory, executor):
|
||||
assert only_one(only_one(l1.rpc.listpeers()['peers'])['channels'])['state'] == 'CLOSINGD_SIGEXCHANGE'
|
||||
|
||||
# l1 reconnects, it should succeed.
|
||||
l1.rpc.disconnect(l2.info['id'], force=True)
|
||||
if only_one(l1.rpc.listpeers(l2.info['id'])['peers'])['connected']:
|
||||
l1.rpc.disconnect(l2.info['id'], force=True)
|
||||
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
|
||||
fut.result(TIMEOUT)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user