mirror of
https://github.com/uqbar-dao/nectar.git
synced 2025-01-04 15:53:21 +03:00
fix simulation-mode
This commit is contained in:
parent
2978bf5935
commit
10b4b6f9a3
@ -7,7 +7,7 @@ use alloy_rpc_types::request::{TransactionInput, TransactionRequest};
|
||||
use alloy_signer::{LocalWallet, Signer, SignerSync};
|
||||
use alloy_sol_types::{SolCall, SolValue};
|
||||
use alloy_transport_ws::WsConnect;
|
||||
use lib::core::Identity;
|
||||
use lib::core::{Identity, NodeRouting};
|
||||
use std::str::FromStr;
|
||||
|
||||
pub mod helpers;
|
||||
@ -191,7 +191,10 @@ pub async fn assign_ws_local_helper(
|
||||
));
|
||||
}
|
||||
|
||||
our.ws_routing = Some((node_ip, ws));
|
||||
our.routing = NodeRouting::Direct {
|
||||
ip: node_ip,
|
||||
ports: std::collections::BTreeMap::from([("ws".to_string(), ws)]),
|
||||
};
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
@ -523,8 +523,7 @@ pub async fn simulate_node(
|
||||
"0x{}",
|
||||
hex::encode(decoded.networking_keypair.public_key().as_ref())
|
||||
),
|
||||
ws_routing: None,
|
||||
allowed_routers: decoded.routers.clone(),
|
||||
routing: NodeRouting::Routers(decoded.routers.clone()),
|
||||
};
|
||||
|
||||
fakenet::assign_ws_local_helper(
|
||||
@ -556,8 +555,10 @@ pub async fn simulate_node(
|
||||
let identity = Identity {
|
||||
name: name.clone(),
|
||||
networking_key: pubkey,
|
||||
ws_routing: Some(("127.0.0.1".into(), ws_port)),
|
||||
allowed_routers: vec![],
|
||||
routing: NodeRouting::Direct {
|
||||
ip: "127.0.0.1".into(),
|
||||
ports: std::collections::BTreeMap::from([("ws".to_string(), ws_port)]),
|
||||
}
|
||||
};
|
||||
|
||||
let decoded_keyfile = Keyfile {
|
||||
|
Loading…
Reference in New Issue
Block a user