Nmv2 add debug config (#5212)
* Add debug config to clients * Add deterministic traffic selection flag
This commit is contained in:
@@ -30,6 +30,7 @@ utoipa-swagger-ui = { workspace = true, features = ["axum"] }
|
||||
|
||||
# internal
|
||||
nym-bin-common = { path = "../common/bin-common" }
|
||||
nym-client-core = { path = "../common/client-core" }
|
||||
nym-crypto = { path = "../common/crypto" }
|
||||
nym-network-defaults = { path = "../common/network-defaults" }
|
||||
nym-sdk = { path = "../sdk/rust/nym-sdk" }
|
||||
|
||||
@@ -88,6 +88,7 @@ async fn make_client(topology: NymTopology) -> Result<MixnetClient> {
|
||||
let mixnet_client = mixnet::MixnetClientBuilder::new_ephemeral()
|
||||
.network_details(net)
|
||||
.custom_topology_provider(topology_provider)
|
||||
.debug_config(mixnet_debug_config(0))
|
||||
// .enable_credentials_mode()
|
||||
.build()?;
|
||||
|
||||
@@ -216,3 +217,14 @@ async fn main() -> Result<()> {
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn mixnet_debug_config(min_gateway_performance: u8) -> nym_client_core::config::DebugConfig {
|
||||
let mut debug_config = nym_client_core::config::DebugConfig::default();
|
||||
debug_config
|
||||
.traffic
|
||||
.disable_main_poisson_packet_distribution = true;
|
||||
debug_config.cover_traffic.disable_loop_cover_traffic_stream = true;
|
||||
debug_config.topology.minimum_gateway_performance = min_gateway_performance;
|
||||
debug_config.traffic.deterministic_route_selection = true;
|
||||
debug_config
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user