mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
subd: simplify and cleanup lifetime handling.
There are now only two kinds of subdaemons: global ones (hsmd, gossipd) and per-peer ones. We can handle many callbacks internally now. We can have a handler to set a new peer owner, and automatically do the cleanup of the old one if necessary, since we now know which ones are per-peer. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
a117d595a4
commit
5a256c724a
@@ -1252,16 +1252,15 @@ class LightningDTests(BaseLightningDTests):
|
||||
# Reconnect.
|
||||
l1.rpc.connect(l2.info['id'], 'localhost:{}'.format(l2.info['port']))
|
||||
|
||||
# We should get a message about old one exiting.
|
||||
# We should get a message about reconnecting.
|
||||
l2.daemon.wait_for_log('Peer has reconnected, state OPENINGD')
|
||||
l2.daemon.wait_for_log('Owning subdaemon lightning_openingd died')
|
||||
|
||||
# Should work fine.
|
||||
l1.rpc.fundchannel(l2.info['id'], 20000)
|
||||
l1.daemon.wait_for_log('sendrawtx exit 0')
|
||||
|
||||
# Just to be sure, second openingd hand over to channeld.
|
||||
l2.daemon.wait_for_log('Subdaemon lightning_openingd died \(0\)')
|
||||
l2.daemon.wait_for_log('lightning_openingd.*REPLY WIRE_OPENING_FUNDEE_REPLY with 2 fds')
|
||||
|
||||
def test_reconnect_normal(self):
|
||||
# Should reconnect fine even if locked message gets lost.
|
||||
|
||||
Reference in New Issue
Block a user