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

Commit 8aea710

Browse files
Merge branch 'master' into system-monitor
2 parents 26d50b9 + 01bf857 commit 8aea710

File tree

11 files changed

+234
-226
lines changed

11 files changed

+234
-226
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ docs/
1919
.teos
2020
.teos_cli
2121
*.orig
22-
/monitor/monitor.conf
22+
/monitor/monitor.conf

cli/README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Refer to [INSTALL.md](INSTALL.md)
1616
#### Global options
1717

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

2222
#### Commands
@@ -176,16 +176,18 @@ python teos_cli.py register
176176
177177
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:
178178
179-
- testnet endpoint = `teos.pisa.watch`
180-
- mainnet endpoint = `teosmainnet.pisa.watch`
179+
- testnet endpoint = `teos-testnet.pisa.watch:443`
180+
- mainnet endpoint = `teos.pisa.watch:443` or `theeyeofsatoshi.pisa.watch:443`
181181
182182
### Connecting to the mainnet instance
183-
Add `--apiconnect https://teosmainnet.pisa.watch` to your calls, for example:
183+
Add `--apiconnect --apiport 443` to your calls, for example:
184184
185185
```
186-
python teos_cli.py --apiconnect https://teosmainnet.pisa.watch add_appointment -f dummy_appointment_data.json
186+
python teos_cli.py --apiconnect=https://teos.pisa.watch add_appointment --apiport=443 -f dummy_appointment_data.json
187187
```
188188
189189
You can also change the config file to avoid specifying the server every time:
190-
191-
`TEOS_SERVER = "https://teosmainnet.pisa.watch"`
190+
```
191+
api_connect = https://teos.pisa.watch
192+
api_port = 443
193+
```

cli/README.md.orig

Lines changed: 0 additions & 210 deletions
This file was deleted.

cli/teos_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ def main(command, args, command_line_conf):
484484
if opt in ["-h", "--help"]:
485485
sys.exit(show_usage())
486486

487-
command = args.pop(0)
487+
command = args.pop(0) if args else None
488488
if command in commands:
489489
main(command, args, command_line_conf)
490490
elif not command:

common/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# teos-common
2+
3+
This is a common library for The Eye of Satoshi. It contains classes and methods that are shared by both the tower and
4+
the clients.

common/requirements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
cryptography==2.8
2+
coincurve
3+
pyzbase32
4+
plyvel

teos/teosd.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def main(command_line_conf):
4343
signal(SIGQUIT, handle_signals)
4444

4545
# Loads config and sets up the data folder and log file
46-
data_dir = command_line_conf.get("DATA_DIR") if "DATA_DIR" in command_line_conf else DATA_DIR
46+
data_dir = command_line_conf.pop("DATA_DIR") if "DATA_DIR" in command_line_conf else DATA_DIR
4747
config_loader = ConfigLoader(data_dir, CONF_FILE_NAME, DEFAULT_CONF, command_line_conf)
4848
config = config_loader.build_config()
4949
setup_data_folder(data_dir)
@@ -173,7 +173,7 @@ def main(command_line_conf):
173173
argv[1:],
174174
"h",
175175
[
176-
"apiconnect=",
176+
"apibind=",
177177
"apiport=",
178178
"btcnetwork=",
179179
"btcrpcuser=",
@@ -188,7 +188,10 @@ def main(command_line_conf):
188188
if opt in ["--apibind"]:
189189
command_line_conf["API_BIND"] = arg
190190
if opt in ["--apiport"]:
191-
command_line_conf["API_PORT"] = arg
191+
try:
192+
command_line_conf["API_PORT"] = int(arg)
193+
except ValueError:
194+
exit("apiport must be an integer")
192195
if opt in ["--btcnetwork"]:
193196
command_line_conf["BTC_NETWORK"] = arg
194197
if opt in ["--btcrpcuser"]:

0 commit comments

Comments
 (0)