wasm fixes
This commit is contained in:
@@ -244,6 +244,16 @@ pub struct TopologyWasmOverride {
|
||||
/// Supersedes `topology_refresh_rate_ms`.
|
||||
#[tsify(optional)]
|
||||
pub disable_refreshing: Option<bool>,
|
||||
|
||||
/// Specifies a minimum performance of a mixnode that is used on route construction.
|
||||
/// This setting is only applicable when `NymApi` topology is used.
|
||||
#[tsify(optional)]
|
||||
pub minimum_mixnode_performance: Option<u8>,
|
||||
|
||||
/// Specifies a minimum performance of a gateway that is used on route construction.
|
||||
/// This setting is only applicable when `NymApi` topology is used.
|
||||
#[tsify(optional)]
|
||||
pub minimum_gateway_performance: Option<u8>,
|
||||
}
|
||||
|
||||
impl From<TopologyWasmOverride> for TopologyWasm {
|
||||
@@ -261,6 +271,12 @@ impl From<TopologyWasmOverride> for TopologyWasm {
|
||||
.max_startup_gateway_waiting_period_ms
|
||||
.unwrap_or(def.max_startup_gateway_waiting_period_ms),
|
||||
disable_refreshing: value.disable_refreshing.unwrap_or(def.disable_refreshing),
|
||||
minimum_mixnode_performance: value
|
||||
.minimum_mixnode_performance
|
||||
.unwrap_or(def.minimum_mixnode_performance),
|
||||
minimum_gateway_performance: value
|
||||
.minimum_gateway_performance
|
||||
.unwrap_or(def.minimum_gateway_performance),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ pub struct WasmRawRegisteredGateway {
|
||||
|
||||
pub derived_aes128_ctr_blake3_hmac_keys_bs58: String,
|
||||
|
||||
pub gateway_owner_address: String,
|
||||
pub gateway_owner_address: Option<String>,
|
||||
|
||||
pub gateway_listener: String,
|
||||
}
|
||||
@@ -55,7 +55,10 @@ impl<'a> From<&'a GatewayRegistration> for WasmRawRegisteredGateway {
|
||||
derived_aes128_ctr_blake3_hmac_keys_bs58: remote_details
|
||||
.derived_aes128_ctr_blake3_hmac_keys
|
||||
.to_base58_string(),
|
||||
gateway_owner_address: remote_details.gateway_owner_address.to_string(),
|
||||
gateway_owner_address: remote_details
|
||||
.gateway_owner_address
|
||||
.as_ref()
|
||||
.map(|a| a.to_string()),
|
||||
gateway_listener: remote_details.gateway_listener.to_string(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -197,7 +197,7 @@ impl NymNodeTesterBuilder {
|
||||
} else {
|
||||
let cfg = GatewayConfig::new(
|
||||
gateway_info.gateway_id,
|
||||
Some(gateway_info.gateway_owner_address.to_string()),
|
||||
gateway_info.gateway_owner_address.map(|a| a.to_string()),
|
||||
gateway_info.gateway_listener.to_string(),
|
||||
);
|
||||
GatewayClient::new(
|
||||
|
||||
Reference in New Issue
Block a user