Skip to content

Cache updatecache fix#14

Merged
MudDev merged 3 commits intomainfrom
cache-updatecache-fix
Feb 23, 2026
Merged

Cache updatecache fix#14
MudDev merged 3 commits intomainfrom
cache-updatecache-fix

Conversation

@MudDev
Copy link
Copy Markdown

@MudDev MudDev commented Feb 23, 2026

This pull request simplifies the logic for enabling the TopHolders module and improves compatibility for nodes that enable the module after initial setup. It removes the distinction between fresh and existing nodes, ensuring the store key is always added when TopHolders is enabled, and updates the upgrade handler to automatically add the store if needed. Additionally, it fixes a timestamp issue in the TopHolders cache.

TopHolders module improvements:

  • Simplified TopHolders store key logic: The conditional check for fresh vs. existing nodes is removed; the store key is always appended to storeKeys when TopHolders is enabled, making the initialization consistent and easier to maintain (evmd/app.go).
  • Unified TopHolders keeper initialization: The keeper is now always initialized with the store key, removing unnecessary checks and supporting backward compatibility more cleanly (evmd/app.go).

Upgrade handling enhancements:

  • Automatic TopHolders store addition: The upgrade handler now ensures the TopHolders store is added if the module is enabled, even for nodes that enable it after passing the upgrade height, simplifying operational complexity (evmd/upgrades.go).

Bug fix:

  • Correct cache timestamp: The TopHolders cache now uses the block time from sdkCtx instead of the current system time, ensuring accurate and deterministic timestamps (x/topholders/keeper/cache.go).

Cleanup:

  • Removed unused filepath import from evmd/app.go, reflecting the simplified initialization logic.

@MudDev MudDev merged commit 3f95f3e into main Feb 23, 2026
8 of 23 checks passed
@MudDev MudDev deleted the cache-updatecache-fix branch February 23, 2026 03:09
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