From 1d5f3661ed3c79484a989d462eab89f4ab4bd551 Mon Sep 17 00:00:00 2001 From: Herr Seppia Date: Thu, 8 Feb 2024 11:39:49 +0100 Subject: [PATCH] node: fix average_step to be between MIN and MAX step timeout --- node/src/chain/acceptor.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/node/src/chain/acceptor.rs b/node/src/chain/acceptor.rs index 76792f39fa..69e4252c01 100644 --- a/node/src/chain/acceptor.rs +++ b/node/src/chain/acceptor.rs @@ -639,6 +639,8 @@ impl Acceptor { .unwrap_or_default() .average() .unwrap_or(MIN_STEP_TIMEOUT) + .max(MIN_STEP_TIMEOUT) + .min(MAX_STEP_TIMEOUT) } }