Commit 0c5b2fd
committed
fix(explorer): prevent block skipping in live view
The live block view could skip blocks when multiple blocks arrived faster
than they could be fetched. The issue was that useBlock hook only fetches
the latest blockNumber value - if blocks N and N+1 arrive while N is still
being fetched, the hook switches to fetching N+1 and block N is never added.
Fixed by maintaining a queue of pending block numbers and processing them
sequentially. Each block that arrives is added to the queue and fetched
in order, ensuring no blocks are skipped.1 parent b7b88d6 commit 0c5b2fd
File tree
2 files changed
+486
-469
lines changed- apps/explorer
- scripts
- src/routes/_layout
2 files changed
+486
-469
lines changed
0 commit comments