mirror of
https://github.com/pezkuwichain/revive-differential-tests.git
synced 2026-04-26 21:27:59 +00:00
custom rpc port
This commit is contained in:
@@ -130,7 +130,7 @@ impl GethNode {
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn new_existing(private_key: &str) -> anyhow::Result<Self> {
|
||||
pub async fn new_existing(private_key: &str, rpc_port: u16) -> anyhow::Result<Self> {
|
||||
use alloy::{primitives::FixedBytes, signers::local::PrivateKeySigner};
|
||||
|
||||
let key_str = private_key.trim().strip_prefix("0x").unwrap_or(private_key.trim());
|
||||
@@ -154,7 +154,7 @@ impl GethNode {
|
||||
let wallet = Arc::new(EthereumWallet::new(signer));
|
||||
|
||||
let node = Self {
|
||||
connection_string: "http://localhost:8545".to_string(),
|
||||
connection_string: format!("http://localhost:{}", rpc_port),
|
||||
base_directory: PathBuf::new(),
|
||||
data_directory: PathBuf::new(),
|
||||
logs_directory: PathBuf::new(),
|
||||
|
||||
@@ -132,7 +132,7 @@ impl SubstrateNode {
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn new_existing(private_key: &str) -> anyhow::Result<Self> {
|
||||
pub async fn new_existing(private_key: &str, rpc_port: u16) -> anyhow::Result<Self> {
|
||||
use alloy::{primitives::FixedBytes, signers::local::PrivateKeySigner};
|
||||
|
||||
let key_str = private_key.trim().strip_prefix("0x").unwrap_or(private_key.trim());
|
||||
@@ -159,7 +159,7 @@ impl SubstrateNode {
|
||||
node_binary: PathBuf::new(),
|
||||
eth_proxy_binary: PathBuf::new(),
|
||||
export_chainspec_command: String::new(),
|
||||
rpc_url: "http://localhost:8545".to_string(),
|
||||
rpc_url: format!("http://localhost:{}", rpc_port),
|
||||
base_directory: PathBuf::new(),
|
||||
logs_directory: PathBuf::new(),
|
||||
substrate_process: None,
|
||||
|
||||
Reference in New Issue
Block a user