Skip to content

Commit

Permalink
fix: wip...
Browse files Browse the repository at this point in the history
  • Loading branch information
guidiaz committed Mar 5, 2024
1 parent 3530a8f commit 866958c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bridges/centralized-ethereum/src/actors/eth_poller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,16 @@ impl EthPoller {
last_dr_id = skip_first;
}
if last_dr_id < next_dr_id {
if last_dr_id + max_batch_size > next_dr_id {
if next_dr_id > last_dr_id + max_batch_size
next_dr_id = last_dr_id + max_batch_size;
}
let init_index = usize::try_from(last_dr_id + 1).unwrap();
let last_index = usize::try_from(next_dr_id).unwrap();
let ids = init_index..last_index;
let ids: Vec<Token> = ids.map(|id| Token::Uint(id.into())).collect();

log::debug!("getQueryStatusBatch params => {}", Token::Tuple(ids.clone()))

let queries_status: Result<Vec<u8>, web3::contract::Error> = wrb_contract
.query(
"getQueryStatusBatch",
Expand Down

0 comments on commit 866958c

Please sign in to comment.