fix ipmixstream new()

This commit is contained in:
mfahampshire
2025-11-07 19:14:33 +00:00
parent cccfa76336
commit 7052e2e902
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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<dyn std::error::Error>> {
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);
+2 -2
View File
@@ -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<Self, MixtcpError> {
let ipr_stream = IpMixStream::new()
let ipr_stream = IpMixStream::new(NetworkEnvironment::Mainnet)
.await
.map_err(|_| MixtcpError::MixnetConnectionFailed)?;