From 7052e2e9025495b17eceeebd7b98bd6f25b0ab70 Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Fri, 7 Nov 2025 19:14:33 +0000 Subject: [PATCH] fix ipmixstream new() --- mixtcp/examples/cloudflare_ping.rs | 4 ++-- mixtcp/examples/https_client.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mixtcp/examples/cloudflare_ping.rs b/mixtcp/examples/cloudflare_ping.rs index e8f4c9a196..9200969a1a 100644 --- a/mixtcp/examples/cloudflare_ping.rs +++ b/mixtcp/examples/cloudflare_ping.rs @@ -7,7 +7,7 @@ use std::{ }; use tracing::info; -use nym_sdk::stream_wrapper::IpMixStream; +use nym_sdk::stream_wrapper::{IpMixStream, NetworkEnvironment}; use smoltcp::{ iface::{Config, Interface, SocketSet}, socket::tcp, @@ -141,7 +141,7 @@ fn init_logging() { async fn main() -> Result<(), Box> { init_logging(); - let ipr_stream = IpMixStream::new().await?; + let ipr_stream = IpMixStream::new(NetworkEnvironment::Mainnet).await?; let (mut device, bridge, allocated_ips) = create_device(ipr_stream).await?; info!("Allocated IP: {}", allocated_ips.ipv4); diff --git a/mixtcp/examples/https_client.rs b/mixtcp/examples/https_client.rs index 99b01024c2..27d3a180aa 100644 --- a/mixtcp/examples/https_client.rs +++ b/mixtcp/examples/https_client.rs @@ -1,6 +1,6 @@ #![allow(clippy::result_large_err)] use mixtcp::{create_device, MixtcpError, NymIprDevice}; -use nym_sdk::stream_wrapper::IpMixStream; +use nym_sdk::stream_wrapper::{IpMixStream, NetworkEnvironment}; use reqwest::StatusCode; use rustls::{pki_types::ServerName, ClientConfig, ClientConnection}; use smoltcp::{ @@ -88,7 +88,7 @@ pub struct MixtcpReqwestClient { impl MixtcpReqwestClient { pub async fn new() -> Result { - let ipr_stream = IpMixStream::new() + let ipr_stream = IpMixStream::new(NetworkEnvironment::Mainnet) .await .map_err(|_| MixtcpError::MixnetConnectionFailed)?;