Skip to content

Conversation

healthykim
Copy link
Contributor

@healthykim healthykim commented Sep 29, 2025

This PR removes the alternates and announced maps in tx_fetcher.

  • The alternates map is used only to check whether a transaction is in stage 2 (queued), and the announced map is used only to check whether a transaction is in stage 3 (fetching).
  • However, regardless of the stage, transactions eventually go through a similar process (being marked in the announces map). So maintaining two separate maps seems unnecessary.
  • Instead, we can iterate over the announces map, which is shared across stage 2 and stage 3, to perform the same check.

Given that the peer set is usually small (e.g., 50 by default), this iteration is expected to be fast.

@cskiraly cskiraly self-assigned this Sep 29, 2025
@cskiraly cskiraly self-requested a review September 29, 2025 07:54
@rjl493456442 rjl493456442 self-assigned this Sep 29, 2025
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.

3 participants