Merge pull request #280 from kinode-dao/hf/hotfix-2

hotfix: fix a bad merge
This commit is contained in:
doria 2024-03-17 16:00:28 -03:00 committed by GitHub
commit 1a3de8d46a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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");
}