Skip to content
This repository was archived by the owner on Oct 16, 2025. It is now read-only.

Revert "feat: Add useCache optional param to getLatestBlock() (#340)" - #350

Closed
jiexi wants to merge 2 commits into
mainfrom
jl/revert-useCache
Closed

Revert "feat: Add useCache optional param to getLatestBlock() (#340)"#350
jiexi wants to merge 2 commits into
mainfrom
jl/revert-useCache

Conversation

@jiexi

@jiexi jiexi commented Oct 15, 2025

Copy link
Copy Markdown
Member

This reverts commit 1d1406b.


Note

Removes the useCache parameter from getLatestBlock() and updates implementation/tests accordingly; changelog updated.

  • API (BREAKING):
    • PollingBlockTracker.getLatestBlock() no longer accepts the optional { useCache } parameter; callers use getLatestBlock() with no args.
  • Implementation:
    • Simplifies getLatestBlock() to always return cached value if present or fetch/wait depending on running state; removes delayed pending-promise reset used for rate limiting when not running.
  • Tests:
    • Removes all test cases covering { useCache: false } scenarios and adjusts related expectations.
  • Docs:
    • Updates CHANGELOG.md under [Unreleased] to note the removal and clarify freshness behavior.

Written by Cursor Bugbot for commit fd461a4. This will update automatically on new commits. Configure here.

@jiexi
jiexi requested a review from a team as a code owner October 15, 2025 16:23
cursor[bot]

This comment was marked as outdated.

@Gudahtt

Gudahtt commented Oct 15, 2025

Copy link
Copy Markdown
Member

Instead of removing this flag, we're going to document the bug with this flag and fix it in a later PR.

For now we've removed any usages of this flag instead as a workaround (see MetaMask/eth-json-rpc-middleware#421)

@Gudahtt Gudahtt closed this Oct 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants