|
14 | 14 | from simulaqron.settings import simulaqron_settings, network_config |
15 | 15 | from simulaqron.settings.network_config import (NodeConfig, DEFAULT_SIMULAQRON_NETWORK_FILENAME, |
16 | 16 | get_default_network_config_file) |
17 | | -from simulaqron.settings.simulaqron_config import SimBackend |
| 17 | +from simulaqron.settings.simulaqron_config import SimBackend, get_default_simulaqron_config_file |
18 | 18 |
|
19 | 19 | CONTEXT_SETTINGS = dict(help_option_names=["-h", "--help"]) |
20 | 20 | # PID folder should be "LOCAL" |
@@ -156,15 +156,15 @@ def version(): |
156 | 156 | "--network-config-file", |
157 | 157 | help=f"Path to network config file. If not specified, uses ./{DEFAULT_SIMULAQRON_NETWORK_FILENAME} " # noqa: E131 |
158 | 158 | f"or ~/.simulaqron/{DEFAULT_SIMULAQRON_NETWORK_FILENAME}", # noqa: E131 |
159 | | - type=click.Path(exists=True, dir_okay=False, resolve_path=True, path_type=Path), |
| 159 | + type=click.Path(exists=False, dir_okay=False, resolve_path=True, path_type=Path), |
160 | 160 | default=get_default_network_config_file() |
161 | 161 | ) |
162 | 162 | @click.option( |
163 | 163 | "--simulaqron-config-file", |
164 | 164 | help=f"Use the given simulaqron config file. Defaults to the file named " # noqa: E131 |
165 | 165 | f"'{DEFAULT_SIMULAQRON_NETWORK_FILENAME}' on the current directory.", # noqa: E131 |
166 | | - type=click.Path(exists=True, dir_okay=False, resolve_path=True, path_type=Path), |
167 | | - default=LOCAL_SIMULAQRON_SETTINGS |
| 166 | + type=click.Path(exists=False, dir_okay=False, resolve_path=True, path_type=Path), |
| 167 | + default=get_default_simulaqron_config_file() |
168 | 168 | ) |
169 | 169 | @click.option( |
170 | 170 | "--name", |
@@ -226,7 +226,7 @@ def start(name: str, nodes: str, simulaqron_config_file: Path, network_config_fi |
226 | 226 | "the --nodes argument." |
227 | 227 | ) |
228 | 228 | for node_to_start in nodes: |
229 | | - if node_to_start not in network_config.networks[name]: |
| 229 | + if node_to_start not in network_config.networks[name].nodes: |
230 | 230 | raise click.BadOptionUsage( |
231 | 231 | option_name="nodes", |
232 | 232 | message=f"The node '{node_to_start}' was not found in the network named " # noqa: E713 |
|
0 commit comments