mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-22 16:44:20 +01:00
tests/test_lightningd.py: move port into node.
We're about to change the JSONRPC, so let's put an explicit 'port' into our node class. We initialize it at startup time: in future I hope to use ephemeral ports to make our tests more easily parallelizable. Suggested-by: @cdecker Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
7d27501c94
commit
6ba9a7cb57
@@ -367,6 +367,10 @@ class LightningNode(object):
|
||||
c.close()
|
||||
db.close()
|
||||
|
||||
def start(self):
|
||||
self.daemon.start()
|
||||
self.port = self.rpc.getinfo()['port']
|
||||
|
||||
def stop(self, timeout=10):
|
||||
""" Attempt to do a clean shutdown, but kill if it hangs
|
||||
"""
|
||||
@@ -403,7 +407,7 @@ class LightningNode(object):
|
||||
else:
|
||||
self.daemon.stop()
|
||||
|
||||
self.daemon.start()
|
||||
self.start()
|
||||
|
||||
def fund_channel(self, l2, amount):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user