fix: wrap fakechain-port flag usage in feature always

This commit is contained in:
dr-frmr 2024-05-07 17:21:58 -06:00
parent 430d58695a
commit 22e676b9a3
No known key found for this signature in database

View File

@ -99,6 +99,9 @@ async fn main() {
.await
.expect("failed to save new eth provider config!");
}
#[cfg(feature = "simulation-mode")]
{
let local_chain_port = matches
.get_one::<u16>("fakechain-port")
.cloned()
@ -106,8 +109,12 @@ async fn main() {
eth_provider_config.push(lib::eth::ProviderConfig {
chain_id: 31337,
trusted: true,
provider: lib::eth::NodeOrRpcUrl::RpcUrl(format!("ws://localhost:{}", local_chain_port)),
provider: lib::eth::NodeOrRpcUrl::RpcUrl(format!(
"ws://localhost:{}",
local_chain_port
)),
});
}
// kernel receives system messages via this channel, all other modules send messages
let (kernel_message_sender, kernel_message_receiver): (MessageSender, MessageReceiver) =