Rewrite litecoin.conf from basicswap-run to add config for 0.21.3.
This commit is contained in:
parent
8d8743074e
commit
f64b2c1030
@ -53,6 +53,24 @@ def startDaemon(node_dir, bin_dir, daemon_bin, opts=[]):
|
|||||||
daemon_bin = os.path.expanduser(os.path.join(bin_dir, daemon_bin))
|
daemon_bin = os.path.expanduser(os.path.join(bin_dir, daemon_bin))
|
||||||
|
|
||||||
datadir_path = os.path.expanduser(node_dir)
|
datadir_path = os.path.expanduser(node_dir)
|
||||||
|
|
||||||
|
# Rewrite litecoin.conf for 0.21.3
|
||||||
|
ltc_conf_path = os.path.join(datadir_path, 'litecoin.conf')
|
||||||
|
if os.path.exists(ltc_conf_path):
|
||||||
|
config_to_add = ['blockfilterindex=0', 'peerblockfilters=0']
|
||||||
|
with open(ltc_conf_path) as fp:
|
||||||
|
for line in fp:
|
||||||
|
line = line.strip()
|
||||||
|
if line in config_to_add:
|
||||||
|
config_to_add.remove(line)
|
||||||
|
|
||||||
|
if len(config_to_add) > 0:
|
||||||
|
logging.info('Rewriting litecoin.conf')
|
||||||
|
shutil.copyfile(ltc_conf_path, ltc_conf_path + '.last')
|
||||||
|
with open(ltc_conf_path, 'a') as fp:
|
||||||
|
for line in config_to_add:
|
||||||
|
fp.write(line + '\n')
|
||||||
|
|
||||||
args = [daemon_bin, '-datadir=' + datadir_path] + opts
|
args = [daemon_bin, '-datadir=' + datadir_path] + opts
|
||||||
logging.info('Starting node ' + daemon_bin + ' ' + '-datadir=' + node_dir)
|
logging.info('Starting node ' + daemon_bin + ' ' + '-datadir=' + node_dir)
|
||||||
return subprocess.Popen(args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=datadir_path)
|
return subprocess.Popen(args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=datadir_path)
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
- Blank/unset for active coins.
|
- Blank/unset for active coins.
|
||||||
- All for all known coins.
|
- All for all known coins.
|
||||||
- Comma separated list of coin tickers to show.
|
- Comma separated list of coin tickers to show.
|
||||||
|
- basicswap-run will rewrite litecoin.conf file to add config required to run Litecoin 0.21.3 in pruned mode.
|
||||||
|
|
||||||
|
|
||||||
0.12.7
|
0.12.7
|
||||||
|
Loading…
Reference in New Issue
Block a user