Skip to content

fix: seed recent blocks on cold start so /block and /tx are not empty… - #696

Closed
singadev wants to merge 1 commit into
ping-pub:masterfrom
SingaXYZ:fix/seed-recent-blocks-on-cold-start
Closed

fix: seed recent blocks on cold start so /block and /tx are not empty…#696
singadev wants to merge 1 commit into
ping-pub:masterfrom
SingaXYZ:fix/seed-recent-blocks-on-cold-start

Conversation

@singadev

Copy link
Copy Markdown

… after refresh

recents is in-memory Pinia state with no persistence, so a page refresh wiped it and it only refilled one block per polling interval (~6s), leaving the /block and /tx pages empty for minutes.

Backfill the recent-blocks window in one shot on cold start via a new seedRecentBlocks() action (sequential fetch, skips failed heights, guarded against overlapping seeds). Seed size is configurable via VITE_INITIAL_BLOCK_SEED and defaults to VITE_RECENT_BLOCK_LIMIT.

… after refresh

recents is in-memory Pinia state with no persistence, so a page refresh wiped it and it only refilled one block per polling interval (~6s), leaving the /block and /tx pages empty for minutes.

Backfill the recent-blocks window in one shot on cold start via a new seedRecentBlocks() action (sequential fetch, skips failed heights, guarded against overlapping seeds). Seed size is configurable via VITE_INITIAL_BLOCK_SEED and defaults to VITE_RECENT_BLOCK_LIMIT.
@singadev singadev closed this Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant