mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
test_lightningd.py: catch unexpected reconnections.
I had a weird failure which was caused by an unexpected disconnect and reconnecct. Since we are prersistend and recover from these, they can slip through our tests; most tests don't involve reconnection, so we need to catch this explicitly. For the connect() helper, we always suppress reconnection; tests which want it all want other options so don't use this helper anyway. (Actually, after I said that, test_closing_while_disconnected was added when I rebased, which did require it, so I had to open-code that one). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -299,12 +299,13 @@ class LightningD(TailableProc):
|
||||
|
||||
|
||||
class LightningNode(object):
|
||||
def __init__(self, daemon, rpc, btc, executor, may_fail=False):
|
||||
def __init__(self, daemon, rpc, btc, executor, may_fail=False, may_reconnect=False):
|
||||
self.rpc = rpc
|
||||
self.daemon = daemon
|
||||
self.bitcoin = btc
|
||||
self.executor = executor
|
||||
self.may_fail = may_fail
|
||||
self.may_reconnect = may_reconnect
|
||||
|
||||
# Use batch if you're doing more than one async.
|
||||
def connect(self, remote_node, capacity, async=False):
|
||||
|
||||
Reference in New Issue
Block a user