Skip to content

Conversation

@onur-ozkan
Copy link
Contributor

@onur-ozkan onur-ozkan commented Nov 17, 2025

Description

Adds a fast path in remove_data_messages to avoid unnecessary work when the caller provides an empty message_ids slice.

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

Adds a fast path in `remove_data_messages` to avoid unnecessary
work when the caller provides an empty `message_ids` slice.

Signed-off-by: Onur Özkan <[email protected]>
@onur-ozkan onur-ozkan changed the title gossipsub: do early return in for an empty input refactor(gossipsub): do early return in for an empty input Nov 17, 2025
Copy link
Member

@elenaf9 elenaf9 left a comment

Choose a reason for hiding this comment

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

Thanks

Signed-off-by: Onur Özkan <[email protected]>
@onur-ozkan onur-ozkan force-pushed the message_ids-early-return branch from b0f1cba to c967ca5 Compare November 18, 2025 17:36
Copy link
Member

@jxs jxs left a comment

Choose a reason for hiding this comment

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

Hi, and thanks! LGTM

@jxs jxs added the send-it label Nov 18, 2025
@mergify mergify bot added the queued label Nov 18, 2025
@mergify mergify bot merged commit 0125fa9 into libp2p:master Nov 18, 2025
68 of 70 checks passed
@mergify mergify bot removed the queued label Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants