Skip to content
This repository was archived by the owner on Aug 9, 2024. It is now read-only.

Commit

Permalink
fix(operator): step (#176)
Browse files Browse the repository at this point in the history
* fix step issue

* new data fetcher
  • Loading branch information
ratankaliani authored Jun 6, 2024
1 parent fb83641 commit 0bc7a1d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bin/vectorx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,8 @@ impl VectorXOperator {
let mut block_to_step_to =
max_valid_block_to_step_to - (max_valid_block_to_step_to % ideal_block_interval);

// If block_to_step_to is the current block, return None.
if block_to_step_to == vectorx_current_block {
// If block_to_step_to is <= to the current block, return None.
if block_to_step_to <= vectorx_current_block {
return None;
}

Expand Down Expand Up @@ -460,6 +460,8 @@ impl VectorXOperator {

async fn run(&mut self) {
loop {
self.data_fetcher = RpcDataFetcher::new().await;

let loop_delay_mins = get_loop_delay_mins();
let block_interval = get_update_delay_blocks();

Expand Down

0 comments on commit 0bc7a1d

Please sign in to comment.