mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
pytest: Do not edit the global copy of the bitcoind config
Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
parent
639713b547
commit
f078941a3d
@ -10,7 +10,6 @@ import decimal
|
||||
import flask
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import threading
|
||||
|
||||
|
||||
|
@ -390,8 +390,11 @@ class BitcoinD(TailableProc):
|
||||
|
||||
class ElementsD(BitcoinD):
|
||||
def __init__(self, bitcoin_dir="/tmp/bitcoind-test", rpcport=None):
|
||||
del BITCOIND_CONFIG['regtest']
|
||||
BITCOIND_CONFIG['chain']='liquid-regtest'
|
||||
config = BITCOIND_CONFIG.copy()
|
||||
if 'regtest' in config:
|
||||
del config['regtest']
|
||||
|
||||
config['chain'] = 'liquid-regtest'
|
||||
BitcoinD.__init__(self, bitcoin_dir, rpcport)
|
||||
|
||||
self.cmd_line = [
|
||||
@ -405,9 +408,9 @@ class ElementsD(BitcoinD):
|
||||
'-con_blocksubsidy=5000000000',
|
||||
]
|
||||
conf_file = os.path.join(bitcoin_dir, 'elements.conf')
|
||||
BITCOIND_CONFIG['rpcport'] = self.rpcport
|
||||
config['rpcport'] = self.rpcport
|
||||
BITCOIND_REGTEST = {'rpcport': self.rpcport}
|
||||
write_config(conf_file, BITCOIND_CONFIG, BITCOIND_REGTEST, section_name='liquid-regtest')
|
||||
write_config(conf_file, config, BITCOIND_REGTEST, section_name='liquid-regtest')
|
||||
self.conf_file = conf_file
|
||||
self.rpc = SimpleBitcoinProxy(btc_conf_file=self.conf_file)
|
||||
self.prefix = 'elementsd'
|
||||
|
Loading…
Reference in New Issue
Block a user