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 726d1b5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions 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 last_index = usize::try_from(next_dr_id + 1).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 726d1b5

Please sign in to comment.