diff --git a/kinode/src/main.rs b/kinode/src/main.rs index c15d206d..68292d3a 100644 --- a/kinode/src/main.rs +++ b/kinode/src/main.rs @@ -99,15 +99,22 @@ async fn main() { .await .expect("failed to save new eth provider config!"); } - let local_chain_port = matches - .get_one::("fakechain-port") - .cloned() - .unwrap_or(8545); - eth_provider_config.push(lib::eth::ProviderConfig { - chain_id: 31337, - trusted: true, - provider: lib::eth::NodeOrRpcUrl::RpcUrl(format!("ws://localhost:{}", local_chain_port)), - }); + + #[cfg(feature = "simulation-mode")] + { + let local_chain_port = matches + .get_one::("fakechain-port") + .cloned() + .unwrap_or(8545); + eth_provider_config.push(lib::eth::ProviderConfig { + chain_id: 31337, + trusted: true, + 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) =