diff --git a/src/node/waku_node.py b/src/node/waku_node.py index db1514fef1f..8f17e77a0ca 100644 --- a/src/node/waku_node.py +++ b/src/node/waku_node.py @@ -13,7 +13,6 @@ from src.env_vars import DOCKER_LOG_DIR from src.data_storage import DS from src.test_data import DEFAULT_CLUSTER_ID -from pathlib import Path logger = get_custom_logger(__name__) @@ -198,9 +197,9 @@ def register_rln(self, **kwargs): if rln_creds_set: if rln_credential_store_ready(keystore_path, True): - p = Path(keystore_path) try: - p.touch() + dir_path = keystore_path.removesuffix("/keystore.json") + shutil.rmtree(dir_path) except Exception as ex: logger.error(f"Keystore removal before RLN registration failed {ex}") raise