mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 23:24:27 +01:00
pytest: Start the Bitcoin RPC proxy as soon as it is created
Avoids attempting to rebind on restart.
This commit is contained in:
@@ -317,6 +317,7 @@ class BitcoinD(TailableProc):
|
|||||||
def get_proxy(self):
|
def get_proxy(self):
|
||||||
proxy = BitcoinRpcProxy(self)
|
proxy = BitcoinRpcProxy(self)
|
||||||
self.proxies.append(proxy)
|
self.proxies.append(proxy)
|
||||||
|
proxy.start()
|
||||||
return proxy
|
return proxy
|
||||||
|
|
||||||
def generate_block(self, numblocks=1):
|
def generate_block(self, numblocks=1):
|
||||||
@@ -384,8 +385,6 @@ class LightningD(TailableProc):
|
|||||||
return self.cmd_prefix + [self.executable] + opts
|
return self.cmd_prefix + [self.executable] + opts
|
||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
self.rpcproxy.start()
|
|
||||||
|
|
||||||
self.opts['bitcoin-rpcport'] = self.rpcproxy.rpcport
|
self.opts['bitcoin-rpcport'] = self.rpcproxy.rpcport
|
||||||
TailableProc.start(self)
|
TailableProc.start(self)
|
||||||
self.wait_for_log("Server started with public key")
|
self.wait_for_log("Server started with public key")
|
||||||
|
|||||||
Reference in New Issue
Block a user