Nmv2 add debug config (#5212)

* Add debug config to clients

* Add deterministic traffic selection flag
This commit is contained in:
Drazen Urch
2024-12-09 09:03:04 +01:00
committed by GitHub
parent 72a4624ace
commit 1b8a929ff5
3 changed files with 14 additions and 0 deletions
+1
View File
@@ -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" }
+12
View File
@@ -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
}