diff --git a/node_cli/configs/__init__.py b/node_cli/configs/__init__.py index 36f89004..05b88d7f 100644 --- a/node_cli/configs/__init__.py +++ b/node_cli/configs/__init__.py @@ -43,6 +43,7 @@ NODE_DATA_PATH = os.path.join(SKALE_DIR, 'node_data') SCHAIN_NODE_DATA_PATH = os.path.join(NODE_DATA_PATH, 'schains') +NODE_CLI_STATUS_FILENAME = 'node_cli.status' NODE_CONFIG_PATH = os.path.join(NODE_DATA_PATH, 'node_config.json') CONTAINER_CONFIG_PATH = os.path.join(SKALE_DIR, 'config') CONTAINER_CONFIG_TMP_PATH = os.path.join(SKALE_TMP_DIR, 'config') diff --git a/node_cli/core/schains.py b/node_cli/core/schains.py index 652210d1..59798bda 100644 --- a/node_cli/core/schains.py +++ b/node_cli/core/schains.py @@ -10,6 +10,7 @@ from node_cli.configs import ( ALLOCATION_FILEPATH, NODE_CONFIG_PATH, + NODE_CLI_STATUS_FILENAME, SCHAIN_NODE_DATA_PATH ) from node_cli.configs.env import get_env_config @@ -90,7 +91,7 @@ def show_config(name: str) -> None: def get_node_cli_schain_status_filepath(schain_name: str) -> str: - return os.path.join(SCHAIN_NODE_DATA_PATH, schain_name, 'node-cli.status') + return os.path.join(SCHAIN_NODE_DATA_PATH, schain_name, NODE_CLI_STATUS_FILENAME) def update_node_cli_schain_status(schain_name: str, status: dict) -> None: @@ -104,8 +105,7 @@ def toggle_schain_repair_mode( ) -> None: ts = int(time.time()) status = {'schain_name': schain, 'repair_ts': ts} - if snapshot_from: - status.update({'snapshot_from': snapshot_from}) + status.update({'snapshot_from': snapshot_from}) update_node_cli_schain_status(schain, status) print('Schain has been set for repair')