mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-23 00:54:20 +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
@@ -3667,8 +3667,7 @@ We send an HTLC, and peer unilaterally closes: do we close upstream?
|
||||
with pytest.raises(RpcError, match=r'WIRE_TEMPORARY_CHANNEL_FAILURE \(reply from remote\)'):
|
||||
l1.rpc.waitsendpay(ph2, timeout=TIMEOUT)
|
||||
|
||||
# l3 closes unilaterally.
|
||||
wait_for(lambda: only_one(l3.rpc.listpeers(l2.info['id'])['peers'])['connected'] is False)
|
||||
# Make close unilaterally.
|
||||
l3.rpc.close(l2.info['id'], 1)
|
||||
|
||||
l3.daemon.wait_for_log('sendrawtransaction')
|
||||
|
||||
Reference in New Issue
Block a user