fix ipmixstream new()
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user