Skip to content

Commit

Permalink
node: fix average_step to be between MIN and MAX step timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
herr-seppia committed Feb 12, 2024
1 parent e308fb6 commit 1d5f366
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions node/src/chain/acceptor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,8 @@ impl<DB: database::DB, VM: vm::VMExecution, N: Network> Acceptor<N, DB, VM> {
.unwrap_or_default()
.average()
.unwrap_or(MIN_STEP_TIMEOUT)
.max(MIN_STEP_TIMEOUT)
.min(MAX_STEP_TIMEOUT)
}
}

Expand Down

0 comments on commit 1d5f366

Please sign in to comment.