diff --git a/nym-api/enter_db.sh b/nym-api/enter_db.sh index e2230554c9..84094e5ec8 100755 --- a/nym-api/enter_db.sh +++ b/nym-api/enter_db.sh @@ -1,2 +1,2 @@ #!/bin/sh -sqlite3 -init settings.sql /Users/jedrzej/workspace/nym/target/debug/build/nym-api-4b7e804a8ee69b15/out/nym-api-example.sqlite \ No newline at end of file +sqlite3 -init settings.sql /Users/jedrzej/workspace/nym/target/debug/build/nym-api-84610644ac15a598/out/nym-api-example.sqlite \ No newline at end of file diff --git a/nym-node/src/config/old_configs/old_config_v9.rs b/nym-node/src/config/old_configs/old_config_v9.rs index 058edfc61e..356116f6bb 100644 --- a/nym-node/src/config/old_configs/old_config_v9.rs +++ b/nym-node/src/config/old_configs/old_config_v9.rs @@ -1291,6 +1291,10 @@ impl ConfigV9 { } async fn upgrade_sphinx_key(old_cfg: &ConfigV9) -> Result<(PathBuf, PathBuf), NymNodeError> { + // we mark the current sphinx key as the primary and attach the current rotation id + let rotation_id = + get_current_rotation_id(&old_cfg.mixnet.nym_api_urls, &old_cfg.mixnet.nyxd_urls).await?; + let current_sphinx_key_path = &old_cfg.storage_paths.keys.private_x25519_sphinx_key_file; let current_pubkey_path = &old_cfg.storage_paths.keys.public_x25519_sphinx_key_file; @@ -1304,10 +1308,6 @@ async fn upgrade_sphinx_key(old_cfg: &ConfigV9) -> Result<(PathBuf, PathBuf), Ny let primary_key_path = keys_dir.join(DEFAULT_PRIMARY_X25519_SPHINX_KEY_FILENAME); let secondary_key_path = keys_dir.join(DEFAULT_SECONDARY_X25519_SPHINX_KEY_FILENAME); - // we mark the current sphinx key as the primary and attach the current rotation id - let rotation_id = - get_current_rotation_id(&old_cfg.mixnet.nym_api_urls, &old_cfg.mixnet.nyxd_urls).await?; - let primary_key = SphinxPrivateKey::import(current_sphinx_key, rotation_id); store_key(&primary_key, &primary_key_path, "sphinx private key")?;