Fix /blocks page freezing in case of large blocks numbers gaps

pull/6243/head
Никита Поздняков 2 years ago
parent 5edd5558d0
commit 1f8473ef8c
No known key found for this signature in database
GPG Key ID: F344106F9804FE5F
  1. 1
      apps/block_scout_web/assets/js/pages/blocks.js

@ -71,6 +71,7 @@ function withMissingBlocks (reducer) {
const blockNumbers = keys(blockNumbersToItems).map(x => parseInt(x, 10)) const blockNumbers = keys(blockNumbersToItems).map(x => parseInt(x, 10))
const minBlock = min(blockNumbers) const minBlock = min(blockNumbers)
const maxBlock = max(blockNumbers) const maxBlock = max(blockNumbers)
if (maxBlock - minBlock > 100) return result
return Object.assign({}, result, { return Object.assign({}, result, {
items: rangeRight(minBlock, maxBlock + 1) items: rangeRight(minBlock, maxBlock + 1)

Loading…
Cancel
Save