dont use deprecated fields

This commit is contained in:
Jędrzej Stuczyński
2025-05-14 09:56:34 +01:00
parent 78e0111d8c
commit ba79b1e4c6
2 changed files with 14 additions and 4 deletions
+1 -1
View File
@@ -1,2 +1,2 @@
#!/bin/sh
sqlite3 -init settings.sql /Users/jedrzej/workspace/nym/target/debug/build/nym-api-3a0aa50356183aba/out/nym-api-example.sqlite
sqlite3 -init settings.sql /Users/jedrzej/workspace/nym/target/debug/build/nym-api-6517e259cadeb663/out/nym-api-example.sqlite
+13 -3
View File
@@ -4,12 +4,12 @@
use nym_api_requests::legacy::{LegacyMixNodeBondWithLayer, LegacyMixNodeDetailsWithLayer};
use nym_api_requests::models::NymNodeData;
use nym_config::defaults::DEFAULT_NYM_NODE_HTTP_PORT;
use nym_crypto::aes::cipher::crypto_common::rand_core::OsRng;
use nym_mixnet_contract_common::mixnode::LegacyPendingMixNodeChanges;
use nym_mixnet_contract_common::{
Gateway, GatewayBond, LegacyMixLayer, MixNode, MixNodeBond, NymNodeDetails,
};
use rand::prelude::SliceRandom;
use rand::rngs::OsRng;
use std::net::{IpAddr, ToSocketAddrs};
use std::str::FromStr;
@@ -61,7 +61,12 @@ pub(crate) fn to_legacy_mixnode(
.node
.custom_http_port
.unwrap_or(DEFAULT_NYM_NODE_HTTP_PORT),
sphinx_key: description.host_information.keys.x25519.to_base58_string(),
sphinx_key: description
.host_information
.keys
.current_x25519_sphinx_key
.public_key
.to_base58_string(),
identity_key: nym_node.bond_information.node.identity_key.clone(),
version: description.build_information.build_version.clone(),
},
@@ -95,7 +100,12 @@ pub(crate) fn to_legacy_gateway(
.location
.map(|c| c.to_string())
.unwrap_or_default(),
sphinx_key: description.host_information.keys.x25519.to_base58_string(),
sphinx_key: description
.host_information
.keys
.current_x25519_sphinx_key
.public_key
.to_base58_string(),
identity_key: nym_node.bond_information.node.identity_key.clone(),
version: description.build_information.build_version.clone(),
},