From ced6d04eb5f769fab28a5fd25b6fd7422c600adc Mon Sep 17 00:00:00 2001 From: Nick Garfield Date: Tue, 1 Mar 2022 16:06:17 -0700 Subject: [PATCH] Make lookback window range inclusive --- bot/src/exec.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/src/exec.rs b/bot/src/exec.rs index 115f4d237..a943e2893 100644 --- a/bot/src/exec.rs +++ b/bot/src/exec.rs @@ -13,7 +13,7 @@ use { }, }; -const LOOKBACK_WINDOW: i64 = 60 * 10; // Number of seconds to lookback +const LOOKBACK_WINDOW: i64 = 60 * 15; // Number of seconds to lookback pub fn execute_tasks( client: Arc, @@ -41,7 +41,7 @@ fn execute_tasks_in_lookback_window( ) { // Spawn threads to execute tasks in lookback window let mut handles = vec![]; - for t in (blocktime - LOOKBACK_WINDOW)..blocktime { + for t in (blocktime - LOOKBACK_WINDOW)..=blocktime { let r_cache = cache.read().unwrap(); r_cache.index.get(&t).and_then(|keys| { for key in keys.iter() {