Daemon: handle path and RPC port selection logic in class

This commit is contained in:
The MMGen Project 2020-02-08 17:43:59 +00:00
commit 6f0e51d566
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
13 changed files with 72 additions and 69 deletions

View file

@ -156,7 +156,7 @@ network_id = get_network_id(get_coin(),bool(_uopts.get('testnet')))
sys.argv.insert(1,'--data-dir=' + data_dir)
sys.argv.insert(1,'--daemon-data-dir=test/daemons/' + get_coin())
sys.argv.insert(1,'--rpc-port={}'.format(Daemon(network_id).rpc_port))
sys.argv.insert(1,'--rpc-port={}'.format(Daemon(network_id,test_suite=True).rpc_port))
# step 2: opts.init will create new data_dir in ./test (if not 'resume' or 'skip_deps'):
usr_args = opts.init(opts_data)