diff --git a/bridges/centralized-ethereum/src/actors/eth_poller.rs b/bridges/centralized-ethereum/src/actors/eth_poller.rs index f33d33927..f22b203fa 100644 --- a/bridges/centralized-ethereum/src/actors/eth_poller.rs +++ b/bridges/centralized-ethereum/src/actors/eth_poller.rs @@ -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 = ids.map(|id| Token::Uint(id.into())).collect(); + log::debug!("getQueryStatusBatch params => {}", Token::Tuple(ids.clone())); + let queries_status: Result, web3::contract::Error> = wrb_contract .query( "getQueryStatusBatch",