From 22d67022af6973f2a4d858d482f9bfd4dd42ff5c Mon Sep 17 00:00:00 2001 From: badrogger Date: Wed, 16 Oct 2024 15:53:57 +0000 Subject: [PATCH 1/2] Fix sync init --- node_cli/operations/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node_cli/operations/base.py b/node_cli/operations/base.py index 01c3d616..c90a8d13 100644 --- a/node_cli/operations/base.py +++ b/node_cli/operations/base.py @@ -232,7 +232,7 @@ def init_sync( schain_name = env['SCHAIN_NAME'] if snapshot_from: - update_node_cli_schain_status(schain_name, {'snapshot_from': snapshot_from}) + update_node_cli_schain_status(schain_name, snapshot_from=snapshot_from) update_images(env.get('CONTAINER_CONFIGS_DIR') != '', sync_node=True) From d7060216c188511cebe71ea1760b89331c5b5ca7 Mon Sep 17 00:00:00 2001 From: badrogger Date: Wed, 16 Oct 2024 16:29:27 +0000 Subject: [PATCH 2/2] Switch to URL_TYPE for --snapshot-from --- node_cli/cli/schains.py | 4 ++-- node_cli/cli/sync_node.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/node_cli/cli/schains.py b/node_cli/cli/schains.py index 06e289a6..c6ef4486 100644 --- a/node_cli/cli/schains.py +++ b/node_cli/cli/schains.py @@ -21,7 +21,7 @@ import click -from node_cli.utils.helper import abort_if_false, IP_TYPE +from node_cli.utils.helper import abort_if_false, URL_TYPE from node_cli.core.schains import ( describe, get_schain_firewall_rules, @@ -87,7 +87,7 @@ def show_rules(schain_name: str) -> None: prompt='Are you sure? Repair mode may corrupt working SKALE chain data.') @click.option( '--snapshot-from', - type=IP_TYPE, + type=URL_TYPE, default=None, hidden=True, help='Ip of the node from to download snapshot from' diff --git a/node_cli/cli/sync_node.py b/node_cli/cli/sync_node.py index 304a20d5..45623635 100644 --- a/node_cli/cli/sync_node.py +++ b/node_cli/cli/sync_node.py @@ -25,9 +25,9 @@ from node_cli.utils.helper import ( abort_if_false, error_exit, - IP_TYPE, safe_load_texts, streamed_cmd, + URL_TYPE ) from node_cli.utils.exit_codes import CLIExitCodes @@ -65,7 +65,7 @@ def sync_node(): ) @click.option( '--snapshot-from', - type=IP_TYPE, + type=URL_TYPE, default=None, hidden=True, help='Ip of the node from to download snapshot from' @@ -118,7 +118,7 @@ def _update_sync(env_file, unsafe_ok): ) @click.option( '--snapshot-from', - type=IP_TYPE, + type=URL_TYPE, default=None, hidden=True, help='Ip of the node from to download snapshot from'