diff --git a/kinode/packages/app_store/app_store/src/lib.rs b/kinode/packages/app_store/app_store/src/lib.rs index eae005c6..63010047 100644 --- a/kinode/packages/app_store/app_store/src/lib.rs +++ b/kinode/packages/app_store/app_store/src/lib.rs @@ -71,6 +71,7 @@ pub enum Resp { } fn fetch_logs(eth_provider: ð::Provider, filter: ð::Filter) -> Vec { + #[cfg(not(feature = "simulation-mode"))] loop { match eth_provider.get_logs(filter) { Ok(res) => return res, @@ -87,6 +88,7 @@ fn fetch_logs(eth_provider: ð::Provider, filter: ð::Filter) -> Vec break, @@ -97,6 +99,7 @@ fn subscribe_to_logs(eth_provider: ð::Provider, filter: eth::Filter) { } } } + #[cfg(not(feature = "simulation-mode"))] println!("subscribed to logs successfully"); } diff --git a/kinode/packages/kns_indexer/kns_indexer/src/lib.rs b/kinode/packages/kns_indexer/kns_indexer/src/lib.rs index 5b1f0605..312af8c0 100644 --- a/kinode/packages/kns_indexer/kns_indexer/src/lib.rs +++ b/kinode/packages/kns_indexer/kns_indexer/src/lib.rs @@ -99,6 +99,7 @@ sol! { } fn subscribe_to_logs(eth_provider: ð::Provider, from_block: u64, filter: eth::Filter) { + #[cfg(not(feature = "simulation-mode"))] loop { match eth_provider.subscribe(1, filter.clone().from_block(from_block)) { Ok(()) => break, @@ -109,6 +110,7 @@ fn subscribe_to_logs(eth_provider: ð::Provider, from_block: u64, filter: eth: } } } + #[cfg(not(feature = "simulation-mode"))] println!("subscribed to logs successfully"); }