mirror of
https://github.com/uqbar-dao/nectar.git
synced 2024-12-22 16:11:38 +03:00
hotfix: fix a bad merge
This commit is contained in:
parent
fab82bf35b
commit
b44352b90a
@ -71,6 +71,7 @@ pub enum Resp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn fetch_logs(eth_provider: ð::Provider, filter: ð::Filter) -> Vec<eth::Log> {
|
fn fetch_logs(eth_provider: ð::Provider, filter: ð::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,
|
||||||
@ -87,6 +88,7 @@ fn fetch_logs(eth_provider: ð::Provider, filter: ð::Filter) -> Vec<eth::Lo
|
|||||||
|
|
||||||
#[allow(unused_variables)]
|
#[allow(unused_variables)]
|
||||||
fn subscribe_to_logs(eth_provider: ð::Provider, filter: eth::Filter) {
|
fn subscribe_to_logs(eth_provider: ð::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,
|
||||||
@ -97,6 +99,7 @@ fn subscribe_to_logs(eth_provider: ð::Provider, filter: eth::Filter) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#[cfg(not(feature = "simulation-mode"))]
|
||||||
println!("subscribed to logs successfully");
|
println!("subscribed to logs successfully");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,6 +99,7 @@ sol! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn subscribe_to_logs(eth_provider: ð::Provider, from_block: u64, filter: eth::Filter) {
|
fn subscribe_to_logs(eth_provider: ð::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,
|
||||||
@ -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");
|
println!("subscribed to logs successfully");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user