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

Reject pending fetch when block tracker is stopped #319

Description

@Gudahtt

The #pendingLatestBlock private instance variable was added to track a pending request for the latest block. However, if _isRunning was true when this was setup, and the polling loop is stopped before the fetch request was initiated, #pendingLatestBlock would stay unresolved forever.

We should reject #pendingLatestBlock if the polling loop is stopped.

Steps to reproduce:

  • Start the block tracker
  • Wait for the first block update to resolve
  • Immediately after, call getLatestBlock
  • Immediately after, stop the block tracker.
  • The call to getLatestBlock would then never resolve

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions