Skip to content

Commit

Permalink
refactor: use now as timestamp for delta calc for pending blocks (#2586)
Browse files Browse the repository at this point in the history
  • Loading branch information
Larkooo authored Nov 1, 2024
1 parent af63e5f commit 05fb95b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/torii/core/src/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,8 @@ impl<'c> Executor<'c> {
let new_tps = if new_timestamp - cursor_timestamp != 0 {
num_transactions / (new_timestamp - cursor_timestamp)
} else {
num_transactions
let now = Instant::now();
num_transactions / (now.elapsed().as_secs() - cursor_timestamp)
};

cursor.last_pending_block_contract_tx =
Expand Down

0 comments on commit 05fb95b

Please sign in to comment.