Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

check is_forwarded packet earlier #28159

Merged
merged 2 commits into from
Nov 11, 2022

Conversation

tao-stones
Copy link
Contributor

@tao-stones tao-stones commented Sep 30, 2022

Problem

refactor (per #28146 ) to check and filter is_forwarded packets earlier.

Summary of Changes

  • combines checking for is_forwarded and is_tracer into single iteration,
  • move the logic into a separate function, add test

Fixes #28146

@tao-stones tao-stones force-pushed the filter_forwarded_earlier branch 2 times, most recently from e7e8169 to 73d3bcc Compare September 30, 2022 20:06
@tao-stones tao-stones force-pushed the filter_forwarded_earlier branch 5 times, most recently from 8da53ba to 1f6803d Compare October 31, 2022 15:36
AshwinSekar
AshwinSekar previously approved these changes Nov 1, 2022
Copy link
Contributor

@AshwinSekar AshwinSekar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

.count()
);
// Only prcoess packets not yet forwarded
let (packets_to_forward, tracer_packet_indexes) = self
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: could rename to is_tracer_packet or something more descriptive since these are not really indexes

@mergify mergify bot dismissed AshwinSekar’s stale review November 11, 2022 20:49

Pull request has been modified.

@tao-stones tao-stones force-pushed the filter_forwarded_earlier branch from 3c6b85c to e8acf5e Compare November 11, 2022 21:56
@tao-stones tao-stones added the automerge Merge this Pull Request automatically once CI passes label Nov 11, 2022
@mergify mergify bot merged commit e5ae0b3 into solana-labs:master Nov 11, 2022
xiangzhu70 pushed a commit to xiangzhu70/solana that referenced this pull request Nov 16, 2022
* check and filter is_forwarded packet earlier

* review fix: renaming; and rebase
gnapoli23 pushed a commit to gnapoli23/solana that referenced this pull request Dec 16, 2022
* check and filter is_forwarded packet earlier

* review fix: renaming; and rebase
nickfrosty pushed a commit to nickfrosty/solana that referenced this pull request Jan 4, 2023
* check and filter is_forwarded packet earlier

* review fix: renaming; and rebase
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
automerge Merge this Pull Request automatically once CI passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check and filter forwarded packets earlier
2 participants