tdex-network / tdex-daemon-alpha

💰 Alpha Daemon implementation to run automated market making strategies on top of TDEX
MIT License
0 stars 2 forks source link

🖥 Commands #37

Closed tiero closed 4 years ago

tiero commented 4 years ago

Before this commit was impossible to specify at startup time a different network, explorer, and default market fee. The only way was to craft and save in the data-dir the config.json file before running the program. Although being a JSON could be an automated process, especially in dockerized setup would have been a bit cumbersome, hence we add command-line arguments.

Available Options

Options:
  --help          Show help                                            
  --version       Show version number                                  
  --regtest, -r   Run in regtest mode                 
  --fee, -f       Specify a default fee to be used by markets
  --explorer, -e  Specify an Electrs HTTP REST endpoint   

Bonus: The crawler now gets the Logger passed from the top and we improved the logging in case the bad response from the explorer.

Closes #36

altafan commented 4 years ago

it would be nice to have also a --log-level flag. Other PR for this?

tiero commented 4 years ago

it would be nice to have also a --log-level flag. Other PR for this?

Yes, This PR does not add any new features. Any Winston related addition should be addressed in a separate PR

altafan commented 4 years ago

If I did not misunderstand, these flags are useful only at the very FIRST startup of the daemon, and not considered for subsequent ones. I would emphasize this in the README.