fix: remove useless sim-mode flags

This commit is contained in:
dr-frmr 2024-03-11 00:27:34 -03:00
parent 61ff56f117
commit fccff76023
No known key found for this signature in database
2 changed files with 0 additions and 5 deletions

View File

@ -71,7 +71,6 @@ pub enum Resp {
} }
fn fetch_logs(eth_provider: &eth::Provider, filter: &eth::Filter) -> Vec<eth::Log> { fn fetch_logs(eth_provider: &eth::Provider, filter: &eth::Filter) -> Vec<eth::Log> {
#[cfg(not(feature = "simulation-mode"))]
loop { loop {
match eth_provider.get_logs(filter) { match eth_provider.get_logs(filter) {
Ok(res) => return res, Ok(res) => return res,
@ -85,7 +84,6 @@ fn fetch_logs(eth_provider: &eth::Provider, filter: &eth::Filter) -> Vec<eth::Lo
} }
fn subscribe_to_logs(eth_provider: &eth::Provider, filter: eth::Filter) { fn subscribe_to_logs(eth_provider: &eth::Provider, filter: eth::Filter) {
#[cfg(not(feature = "simulation-mode"))]
loop { loop {
match eth_provider.subscribe(1, filter.clone()) { match eth_provider.subscribe(1, filter.clone()) {
Ok(()) => break, Ok(()) => break,
@ -96,7 +94,6 @@ fn subscribe_to_logs(eth_provider: &eth::Provider, filter: eth::Filter) {
} }
} }
} }
#[cfg(not(feature = "simulation-mode"))]
println!("subscribed to logs successfully"); println!("subscribed to logs successfully");
} }

View File

@ -99,7 +99,6 @@ sol! {
} }
fn subscribe_to_logs(eth_provider: &eth::Provider, from_block: u64, filter: eth::Filter) { fn subscribe_to_logs(eth_provider: &eth::Provider, from_block: u64, filter: eth::Filter) {
#[cfg(not(feature = "simulation-mode"))]
loop { loop {
match eth_provider.subscribe(1, filter.clone().from_block(from_block)) { match eth_provider.subscribe(1, filter.clone().from_block(from_block)) {
Ok(()) => break, Ok(()) => break,
@ -110,7 +109,6 @@ fn subscribe_to_logs(eth_provider: &eth::Provider, from_block: u64, filter: eth:
} }
} }
} }
#[cfg(not(feature = "simulation-mode"))]
println!("subscribed to logs successfully"); println!("subscribed to logs successfully");
} }