Skip to content
This repository has been archived by the owner on Sep 26, 2022. It is now read-only.

Commit

Permalink
Merge branch 'master' into system-monitor
Browse files Browse the repository at this point in the history
  • Loading branch information
orbitalturtle committed May 20, 2020
2 parents 26d50b9 + 01bf857 commit 8aea710
Show file tree
Hide file tree
Showing 11 changed files with 234 additions and 226 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ docs/
.teos
.teos_cli
*.orig
/monitor/monitor.conf
/monitor/monitor.conf
16 changes: 9 additions & 7 deletions cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Refer to [INSTALL.md](INSTALL.md)
#### Global options

- `--apiconnect`: API server where to send the requests. Defaults to 'localhost' (modifiable in conf file).
- `-apiport` : API port where to send the requests. Defaults to '9814' (modifiable in conf file).
- `--apiport` : API port where to send the requests. Defaults to '9814' (modifiable in conf file).
- `-h --help`: shows a list of commands or help for a specific command.

#### Commands
Expand Down Expand Up @@ -176,16 +176,18 @@ python teos_cli.py register

By default, `teos_cli` will connect to your local instance (running on localhost). There are also a couple of live instances running, one for mainet and one for testnet:

- testnet endpoint = `teos.pisa.watch`
- mainnet endpoint = `teosmainnet.pisa.watch`
- testnet endpoint = `teos-testnet.pisa.watch:443`
- mainnet endpoint = `teos.pisa.watch:443` or `theeyeofsatoshi.pisa.watch:443`

### Connecting to the mainnet instance
Add `--apiconnect https://teosmainnet.pisa.watch` to your calls, for example:
Add `--apiconnect --apiport 443` to your calls, for example:

```
python teos_cli.py --apiconnect https://teosmainnet.pisa.watch add_appointment -f dummy_appointment_data.json
python teos_cli.py --apiconnect=https://teos.pisa.watch add_appointment --apiport=443 -f dummy_appointment_data.json
```

You can also change the config file to avoid specifying the server every time:

`TEOS_SERVER = "https://teosmainnet.pisa.watch"`
```
api_connect = https://teos.pisa.watch
api_port = 443
```
210 changes: 0 additions & 210 deletions cli/README.md.orig

This file was deleted.

2 changes: 1 addition & 1 deletion cli/teos_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ def main(command, args, command_line_conf):
if opt in ["-h", "--help"]:
sys.exit(show_usage())

command = args.pop(0)
command = args.pop(0) if args else None
if command in commands:
main(command, args, command_line_conf)
elif not command:
Expand Down
4 changes: 4 additions & 0 deletions common/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# teos-common

This is a common library for The Eye of Satoshi. It contains classes and methods that are shared by both the tower and
the clients.
4 changes: 4 additions & 0 deletions common/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
cryptography==2.8
coincurve
pyzbase32
plyvel
9 changes: 6 additions & 3 deletions teos/teosd.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def main(command_line_conf):
signal(SIGQUIT, handle_signals)

# Loads config and sets up the data folder and log file
data_dir = command_line_conf.get("DATA_DIR") if "DATA_DIR" in command_line_conf else DATA_DIR
data_dir = command_line_conf.pop("DATA_DIR") if "DATA_DIR" in command_line_conf else DATA_DIR
config_loader = ConfigLoader(data_dir, CONF_FILE_NAME, DEFAULT_CONF, command_line_conf)
config = config_loader.build_config()
setup_data_folder(data_dir)
Expand Down Expand Up @@ -173,7 +173,7 @@ def main(command_line_conf):
argv[1:],
"h",
[
"apiconnect=",
"apibind=",
"apiport=",
"btcnetwork=",
"btcrpcuser=",
Expand All @@ -188,7 +188,10 @@ def main(command_line_conf):
if opt in ["--apibind"]:
command_line_conf["API_BIND"] = arg
if opt in ["--apiport"]:
command_line_conf["API_PORT"] = arg
try:
command_line_conf["API_PORT"] = int(arg)
except ValueError:
exit("apiport must be an integer")
if opt in ["--btcnetwork"]:
command_line_conf["BTC_NETWORK"] = arg
if opt in ["--btcrpcuser"]:
Expand Down
Loading

0 comments on commit 8aea710

Please sign in to comment.