mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
lightningd: drive all reconnections out of disconnections.
The only places which should call try_reconnect now are the "connect" command, and the disconnect path when it decides there's still an active channel. This introduces one subtlety: if we disconnect when there's no active channel, but then the subd makes one, we have to catch that case! This temporarily reverts "slow" reconnections to fast ones: see next patch. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
neil saitug
parent
a3c4908f4a
commit
02e169fd27
@@ -1095,7 +1095,8 @@ def test_funding_reorg_private(node_factory, bitcoind):
|
||||
opts = {'funding-confirms': 2, 'rescan': 10, 'may_reconnect': True,
|
||||
'allow_bad_gossip': True,
|
||||
# gossipd send lightning update for original channel.
|
||||
'allow_broken_log': True}
|
||||
'allow_broken_log': True,
|
||||
'allow_warning': True}
|
||||
l1, l2 = node_factory.line_graph(2, fundchannel=False, opts=opts)
|
||||
l1.fundwallet(10000000)
|
||||
sync_blockheight(bitcoind, [l1]) # height 102
|
||||
@@ -1138,7 +1139,8 @@ def test_funding_reorg_remote_lags(node_factory, bitcoind):
|
||||
"""Nodes may disagree about short_channel_id before channel announcement
|
||||
"""
|
||||
# may_reconnect so channeld will restart; bad gossip can happen due to reorg
|
||||
opts = {'funding-confirms': 1, 'may_reconnect': True, 'allow_bad_gossip': True}
|
||||
opts = {'funding-confirms': 1, 'may_reconnect': True, 'allow_bad_gossip': True,
|
||||
'allow_warning': True}
|
||||
l1, l2 = node_factory.line_graph(2, fundchannel=False, opts=opts)
|
||||
l1.fundwallet(10000000)
|
||||
sync_blockheight(bitcoind, [l1]) # height 102
|
||||
|
||||
Reference in New Issue
Block a user