hotfix: fix a bad merge

This commit is contained in:
hosted-fornet 2024-03-17 11:59:16 -07:00
parent fab82bf35b
commit b44352b90a
2 changed files with 5 additions and 0 deletions

View File

@ -71,6 +71,7 @@ pub enum Resp {
}
fn fetch_logs(eth_provider: &eth::Provider, filter: &eth::Filter) -> Vec<eth::Log> {
#[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: &eth::Provider, filter: &eth::Filter) -> Vec<eth::Lo
#[allow(unused_variables)]
fn subscribe_to_logs(eth_provider: &eth::Provider, filter: eth::Filter) {
#[cfg(not(feature = "simulation-mode"))]
loop {
match eth_provider.subscribe(1, filter.clone()) {
Ok(()) => break,
@ -97,6 +99,7 @@ fn subscribe_to_logs(eth_provider: &eth::Provider, filter: eth::Filter) {
}
}
}
#[cfg(not(feature = "simulation-mode"))]
println!("subscribed to logs successfully");
}

View File

@ -99,6 +99,7 @@ sol! {
}
fn subscribe_to_logs(eth_provider: &eth::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: &eth::Provider, from_block: u64, filter: eth:
}
}
}
#[cfg(not(feature = "simulation-mode"))]
println!("subscribed to logs successfully");
}