mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-17 19:03:42 +01:00
pytest: Have bitcoind remember its config file
There were a few places we were rebuilding the config path by appending `bitcoin.conf` to the bitcoin directory. So now we just remember it and reference it instead. Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
parent
b9d7731100
commit
25c830a533
@ -34,8 +34,7 @@ class BitcoinRpcProxy(object):
|
||||
self.request_count = 0
|
||||
|
||||
def _handle_request(self, r):
|
||||
conf_file = os.path.join(self.bitcoind.bitcoin_dir, 'bitcoin.conf')
|
||||
brpc = BitcoinProxy(btc_conf_file=conf_file)
|
||||
brpc = BitcoinProxy(btc_conf_file=self.bitcoind.conf_file)
|
||||
method = r['method']
|
||||
|
||||
# If we have set a mock for this method reply with that instead of
|
||||
|
@ -305,9 +305,9 @@ class BitcoinD(TailableProc):
|
||||
# For after 0.16.1 (eg. 3f398d7a17f136cd4a67998406ca41a124ae2966), this
|
||||
# needs its own [regtest] section.
|
||||
BITCOIND_REGTEST = {'rpcport': rpcport}
|
||||
btc_conf_file = os.path.join(bitcoin_dir, 'bitcoin.conf')
|
||||
write_config(btc_conf_file, BITCOIND_CONFIG, BITCOIND_REGTEST)
|
||||
self.rpc = SimpleBitcoinProxy(btc_conf_file=btc_conf_file)
|
||||
self.conf_file = os.path.join(bitcoin_dir, 'bitcoin.conf')
|
||||
write_config(self.conf_file, BITCOIND_CONFIG, BITCOIND_REGTEST)
|
||||
self.rpc = SimpleBitcoinProxy(btc_conf_file=self.conf_file)
|
||||
self.proxies = []
|
||||
|
||||
def start(self):
|
||||
|
Loading…
Reference in New Issue
Block a user